On 12/5/18 10:38 AM, Vladimir Sementsov-Ogievskiy wrote:
- magic = ldq_be_p(buf);
+ magic = be64_to_cpu(magic);
Isn't it better to use be64_to_cpus?
No. We're intentionally getting rid of that because of clang; see commit
80c7c2b0.
Ok, thanks. In this case it should be safe, but i
05.12.2018 19:29, Eric Blake wrote:
> On 12/5/18 9:59 AM, Vladimir Sementsov-Ogievskiy wrote:
>> 01.12.2018 1:03, Eric Blake wrote:
>>> There's no need to read into a temporary buffer (oversized
>>> since commit 7d3123e1) followed by a byteswap into a uint64_t
>>> to check for a magic number via me
On 12/5/18 9:59 AM, Vladimir Sementsov-Ogievskiy wrote:
01.12.2018 1:03, Eric Blake wrote:
There's no need to read into a temporary buffer (oversized
since commit 7d3123e1) followed by a byteswap into a uint64_t
to check for a magic number via memcmp(), when the code
immediately below demonstrat
01.12.2018 1:03, Eric Blake wrote:
> There's no need to read into a temporary buffer (oversized
> since commit 7d3123e1) followed by a byteswap into a uint64_t
> to check for a magic number via memcmp(), when the code
> immediately below demonstrates reading into the uint64_t then
> byteswapping in
On 11/30/18 4:30 PM, Richard W.M. Jones wrote:
On Fri, Nov 30, 2018 at 04:03:34PM -0600, Eric Blake wrote:
There's no need to read into a temporary buffer (oversized
since commit 7d3123e1) followed by a byteswap into a uint64_t
to check for a magic number via memcmp(), when the code
immediately
On Fri, Nov 30, 2018 at 04:03:34PM -0600, Eric Blake wrote:
> There's no need to read into a temporary buffer (oversized
> since commit 7d3123e1) followed by a byteswap into a uint64_t
> to check for a magic number via memcmp(), when the code
> immediately below demonstrates reading into the uint64
There's no need to read into a temporary buffer (oversized
since commit 7d3123e1) followed by a byteswap into a uint64_t
to check for a magic number via memcmp(), when the code
immediately below demonstrates reading into the uint64_t then
byteswapping in place and checking for a magic number via
in