it's a natural choice and compatible with a version found in NetBSD libc.
Signed-off-by: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
#endif
/* Returns the number of 1-bits in 'x', between 0 and 32 inclusive. */
-int
+unsigned int
popcount(uint32_t x)
{
/* In my testing, this implementation is over twice as fast as any other
int log_2_floor(uint32_t);
int log_2_ceil(uint32_t);
-int popcount(uint32_t);
+unsigned int popcount(uint32_t);
/* Returns the rightmost 1-bit in 'x' (e.g. 01011000 => 00001000), or 0 if 'x'
* is 0. */