diff mbox

[09/15] libmultipath/checkers/rbd: Use unsigned int for one-bit bitfields

Message ID 3fea16e1-1c74-4e43-a108-329e7d03d858@sandisk.com (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show

Commit Message

Bart Van Assche Oct. 21, 2016, 6:44 p.m. UTC
Avoid that this bitfield is sign-extended. Detected by sparse.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
---
 libmultipath/checkers/rbd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/libmultipath/checkers/rbd.c b/libmultipath/checkers/rbd.c
index f60914e..745e240 100644
--- a/libmultipath/checkers/rbd.c
+++ b/libmultipath/checkers/rbd.c
@@ -46,7 +46,7 @@  struct rbd_checker_context {
 	char *username;
 	int remapped;
 	int blacklisted;
-	int lock_on_read:1;
+	unsigned lock_on_read:1;
 
 	rados_t cluster;