[Libguestfs] [PATCH nbdkit v2 4/6] common/include: Make log_2_bits work on 64 bit ints
Richard W.M. Jones
rjones at redhat.com
Thu May 18 09:58:29 UTC 2023
On Wed, May 17, 2023 at 04:36:32PM -0500, Eric Blake wrote:
> On Wed, May 17, 2023 at 11:06:57AM +0100, Richard W.M. Jones wrote:
> > Previously it only worked for 64 bit ints on 64 bit platforms, but we
> > can easily adjust the function to work on any platform.
> > ---
> > common/include/ispowerof2.h | 4 ++--
> > common/include/test-ispowerof2.c | 6 ++----
> > 2 files changed, 4 insertions(+), 6 deletions(-)
>
> Should we also fix is_power_of_2() to work on 64-bit values on all
> platforms?
Possibly, but I don't need that for this patch.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html
More information about the Libguestfs
mailing list