[Libguestfs] [PATCH nbdkit v2] common: isaligned: Use a macro instead of relying on implicit truncation.
Eric Blake
eblake at redhat.com
Mon Sep 17 21:50:36 UTC 2018
On 9/17/18 4:41 PM, Nir Soffer wrote:
> The FreeBSD version:
>
> #define IS_ALIGNED <http://fxr.watson.org/fxr/ident?i=IS_ALIGNED>(n
> <http://fxr.watson.org/fxr/ident?i=n>,align) (!((uint32_t)(n
> <http://fxr.watson.org/fxr/ident?i=n>) & (align - 1)))
>
> http://fxr.watson.org/fxr/source/contrib/ncsw/inc/ncsw_ext.h#L182
Which truncates to 32 bits. But that's what we're trying to get rid of
- by moving to a macro that lets us do full 64-bit alignment if needed.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
More information about the Libguestfs
mailing list