[Sheepdog] expected bit size of __ffs
Steven Dake
sdake at redhat.com
Mon May 17 18:34:37 CEST 2010
Is __ffs expecting 64 bit parameters? At line 18 of bitops.h, there is
a >> by 32, which with a 32 bit parameter results in the value 0.
unsigned long on 64 bit platforms = 64 bits, on 32 bit platforms, 32
bits. A better solution to dealing with this long term is to use
stdint.h ie:
uint64_t
uint32_t
I know there is no current support for 32 bit platforms, but proper
inttyping is always helpful. This is one area C is suboptimal by
default. :)
More information about the sheepdog
mailing list