aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2013-02-01 14:55:14 -0800
committerBen Pfaff <blp@nicira.com>2013-02-01 14:55:14 -0800
commitcc2862a93261e9fc9c3880982a9f45e10061733f (patch)
treee96f08b12cabcfb873c33e52b1c9753fa90b7788 /lib
parentb36db1148939c1ca7af3c3973252fea3fbf1c4e6 (diff)
Use is_pow2() function, where possible, instead of IS_POW2 macro.
The IS_POW2 macro is meant for use in contexts where a function call is not allowed. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Ethan Jackson <ethan@nicira.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/util.c b/lib/util.c
index 83d3ff80..cbaffa73 100644
--- a/lib/util.c
+++ b/lib/util.c
@@ -810,7 +810,7 @@ log_2_floor(uint32_t n)
int
log_2_ceil(uint32_t n)
{
- return log_2_floor(n) + !IS_POW2(n);
+ return log_2_floor(n) + !is_pow2(n);
}
/* Returns the number of trailing 0-bits in 'n'. Undefined if 'n' == 0. */