29 lines
759 B
Diff
29 lines
759 B
Diff
|
|
From 7d30130a5d53629e7c3420aa58018c75fa9dbeef Mon Sep 17 00:00:00 2001
|
||
|
|
From: Martin Wilck <mwilck@suse.com>
|
||
|
|
Date: Tue, 8 Jan 2019 23:54:02 +0100
|
||
|
|
Subject: [PATCH] libmultipath(coverity): fix apparent overflow
|
||
|
|
|
||
|
|
"preferred_path" contains always "0" or "1".
|
||
|
|
|
||
|
|
Signed-off-by: Martin Wilck <mwilck@suse.com>
|
||
|
|
---
|
||
|
|
libmultipath/discovery.c | 2 +-
|
||
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
|
||
|
|
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
|
||
|
|
index 7f983a63..3fd79a36 100644
|
||
|
|
--- a/libmultipath/discovery.c
|
||
|
|
+++ b/libmultipath/discovery.c
|
||
|
|
@@ -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
|
||
|
|
--
|
||
|
|
2.11.0
|
||
|
|
|