From 5b896df0543e484b4de4de0a6ffa1053c5f92273 Mon Sep 17 00:00:00 2001 From: linbaiye Date: Fri, 21 Sep 2012 16:50:34 +0800 Subject: Fix problems of mismatch type. Checking if an uint32_t is less than zero is unnecessary, so we change the parameter and return value to int. Change-Id: I5c08eaf8fd4c33768a366b22f0f5db9575056a1e BUG: 789278 Signed-off-by: linbaiye Reviewed-on: http://review.gluster.org/3965 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- libglusterfs/src/common-utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libglusterfs/src/common-utils.c') diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index cf5991e10..791ecefe6 100644 --- a/libglusterfs/src/common-utils.c +++ b/libglusterfs/src/common-utils.c @@ -1925,9 +1925,9 @@ out: */ inline int32_t -gf_roundup_power_of_two (uint32_t nr) +gf_roundup_power_of_two (int32_t nr) { - uint32_t result = 1; + int32_t result = 1; if (nr < 0) { gf_log ("common-utils", GF_LOG_WARNING, @@ -1949,7 +1949,7 @@ out: */ inline int32_t -gf_roundup_next_power_of_two (uint32_t nr) +gf_roundup_next_power_of_two (int32_t nr) { int32_t result = 1; -- cgit