it's a natural choice and compatible with a version found in NetBSD libc. Signed-off-by: YAMAMOTO Takashi <y...@mwd.biglobe.ne.jp> --- lib/util.c | 2 +- lib/util.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/util.c b/lib/util.c index cbaffa7..cd4019e 100644 --- a/lib/util.c +++ b/lib/util.c @@ -843,7 +843,7 @@ raw_ctz(uint32_t n) #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 diff --git a/lib/util.h b/lib/util.h index b944ec7..4f6a201 100644 --- a/lib/util.h +++ b/lib/util.h @@ -265,7 +265,7 @@ ctz(uint32_t n) 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. */ -- 1.8.0.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev