libmultipath: group_by_prio: fix signedness bug
authorMartin Wilck <mwilck@suse.com>
Thu, 11 Apr 2019 10:49:20 +0000 (12:49 +0200)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Fri, 19 Apr 2019 13:37:37 +0000 (15:37 +0200)
pp->priority can be negative, so we we shouldn't compare
it with an unsigned int.

Signed-off-by: Martin Wilck <mwilck@suse.com>
libmultipath/pgpolicies.c

index ac2596a..660768a 100644 (file)
@@ -312,7 +312,7 @@ out:
 int group_by_prio(struct multipath *mp)
 {
        int i;
-       unsigned int prio;
+       int prio;
        struct path * pp;
        struct pathgroup * pgp;
        vector pathvec = NULL;