eal: fix check for power of 2 in 0 case
authorRavi Kerur <rkerur@gmail.com>
Sat, 27 Dec 2014 15:30:44 +0000 (10:30 -0500)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 15 Jan 2015 12:41:39 +0000 (13:41 +0100)
commit2fc8d6daa4c7a8b247e3bc2b791b1229e8bcd617
treecfbefb378541fbb83f06249d9e38e35d2929475d
parent9b0895e864a36c8a3b26cc9da3f685996bb41602
eal: fix check for power of 2 in 0 case

rte_is_power_of_2 returns true for 0 and 0 is not power_of_2.
Fix by checking for n.

Signed-off-by: Ravi Kerur <rkerur@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
lib/librte_eal/common/include/rte_common.h