summaryrefslogtreecommitdiffstats
path: root/mount/lomount.c
diff options
context:
space:
mode:
authorAndreas Schwab2011-08-22 23:15:03 +0200
committerKarel Zak2011-08-23 11:58:44 +0200
commit3c55d914df767a5fa2dd52feb4e8cc5ce604ea2a (patch)
tree54b259f0e79d940410ec5aa6884c725e0527741c /mount/lomount.c
parentdocs: drop the pluralization item with ngettext() in TODO file (diff)
downloadkernel-qcow2-util-linux-3c55d914df767a5fa2dd52feb4e8cc5ce604ea2a.tar.gz
kernel-qcow2-util-linux-3c55d914df767a5fa2dd52feb4e8cc5ce604ea2a.tar.xz
kernel-qcow2-util-linux-3c55d914df767a5fa2dd52feb4e8cc5ce604ea2a.zip
losetup: correct qsort compare function
Return the correct value from comparing the operands. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Diffstat (limited to 'mount/lomount.c')
-rw-r--r--mount/lomount.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mount/lomount.c b/mount/lomount.c
index 34d151ac1..fad58d57f 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);
}
/*