libmultipath(coverity): fix apparent overflow
authorMartin Wilck <mwilck@suse.com>
Tue, 8 Jan 2019 22:54:02 +0000 (23:54 +0100)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Sat, 19 Jan 2019 10:41:39 +0000 (11:41 +0100)
"preferred_path" contains always "0" or "1".

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

index 7f983a6..3fd79a3 100644 (file)
@@ -520,7 +520,7 @@ sysfs_get_asymmetric_access_state(struct path *pp, char *buff, int buflen)
                /* Parse error, ignore */
                return 0;
        }
-       return  preferred;
+       return !!preferred;
 }
 
 static void