diff options
author | Karel Zak | 2011-08-23 12:01:12 +0200 |
---|---|---|
committer | Karel Zak | 2011-08-23 12:01:12 +0200 |
commit | 33487796e7f9bfeeb347d57c60e7df65b06168b2 (patch) | |
tree | 2aef1804075578ea9df53161cc477e1c4eca9089 /lib | |
parent | losetup: correct qsort compare function (diff) | |
download | kernel-qcow2-util-linux-33487796e7f9bfeeb347d57c60e7df65b06168b2.tar.gz kernel-qcow2-util-linux-33487796e7f9bfeeb347d57c60e7df65b06168b2.tar.xz kernel-qcow2-util-linux-33487796e7f9bfeeb347d57c60e7df65b06168b2.zip |
lib: [loopdev.c] correct qsort compare function
Reported-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/loopdev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/loopdev.c b/lib/loopdev.c index fa3ad4560..81b7d2d6e 100644 --- a/lib/loopdev.c +++ b/lib/loopdev.c @@ -309,7 +309,8 @@ static int loopiter_set_device(struct loopdev_cxt *lc, const char *device) static int cmpnum(const void *p1, const void *p2) { - return (* (int *) p1) > (* (int *) p2); + return (((* (int *) p1) > (* (int *) p2)) - + ((* (int *) p1) < (* (int *) p2))); } /* |