aboutsummaryrefslogtreecommitdiff
path: root/kernel-features.c
diff options
context:
space:
mode:
authorAdam Litke <agl@us.ibm.com>2008-10-23 19:53:34 +0000
committerEric B Munson <ebmunson@us.ibm.com>2008-10-27 10:41:39 +0000
commit38d4bb43ca09221762743da3462f3fa6a52d3326 (patch)
tree66b5171f856830fbc617e9dd1756e5c7b9749b8e /kernel-features.c
parent3431ae05c03ca1fa4b4f666acb657c5c314ff4fe (diff)
downloadlibhugetlbfs-38d4bb43ca09221762743da3462f3fa6a52d3326.tar.gz
utils: Buglet in kernel version comparison function
Oops. The greater-than operator (>) is not commutative. While trying to test for a > b, we are accidentally re-testing a < b. Fix. Signed-off-by: Adam Litke <agl@us.ibm.com> Acked-by: Mel Gorman <mel@csn.ul.ie> Signed-off-by: Eric B Munson <ebmunson@us.ibm.com>
Diffstat (limited to 'kernel-features.c')
-rw-r--r--kernel-features.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel-features.c b/kernel-features.c
index 8a80117..c6a9987 100644
--- a/kernel-features.c
+++ b/kernel-features.c
@@ -104,7 +104,7 @@ static int int_cmp(int a, int b)
{
if (a < b)
return -1;
- if (b > a)
+ if (a > b)
return 1;
else
return 0;