2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

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>
This commit is contained in:
Ben Pfaff
2013-02-01 14:55:14 -08:00
parent b36db11489
commit cc2862a932
2 changed files with 2 additions and 2 deletions

View File

@@ -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. */

View File

@@ -2182,7 +2182,7 @@ ofctl_parse_flows__(struct ofputil_flow_mod *fms, size_t n_fms)
break;
}
}
ovs_assert(IS_POW2(protocol));
ovs_assert(is_pow2(protocol));
printf("chosen protocol: %s\n", ofputil_protocol_to_string(protocol));