libmultipath/checkers/rbd: Use unsigned int for one-bit bitfields
authorBart Van Assche <bart.vanassche@sandisk.com>
Fri, 21 Oct 2016 18:44:31 +0000 (11:44 -0700)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Thu, 3 Nov 2016 13:36:04 +0000 (14:36 +0100)
Avoid that this bitfield is sign-extended. Detected by sparse.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
libmultipath/checkers/rbd.c

index f60914e..745e240 100644 (file)
@@ -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;