From: Andreas Schwab Date: Mon, 22 Aug 2011 21:15:03 +0000 (+0200) Subject: losetup: correct qsort compare function X-Git-Tag: v2.20~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c55d914df767a5fa2dd52feb4e8cc5ce604ea2a;p=thirdparty%2Futil-linux.git losetup: correct qsort compare function Return the correct value from comparing the operands. Signed-off-by: Andreas Schwab --- diff --git a/mount/lomount.c b/mount/lomount.c index 34d151ac14..fad58d57f9 100644 --- a/mount/lomount.c +++ b/mount/lomount.c @@ -285,7 +285,7 @@ name2minor(int hasprefix, const char *name) static int cmpnum(const void *p1, const void *p2) { - return (* (int *) p1) > (* (int *) p2); + return (*(int *) p1 > *(int *) p2) - (*(int *) p1 < *(int *) p2); } /*