]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd/internal.cc: clarify expression with parentheses
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 11 Mar 2013 11:52:44 +0000 (12:52 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 11 Mar 2013 11:52:44 +0000 (12:52 +0100)
From cppcheck:
 [src/librbd/internal.cc:379]: (style) Boolean result is used in
 bitwise operation. Clarify expression with parentheses.

src/librbd/internal.cc

index f9509435f8856bbf7b17ddcae0d2ec665e619d12..25734ef3e7d868d002e0d76841584f9f5e55e135 100644 (file)
@@ -376,7 +376,7 @@ namespace librbd {
       return r;
 
     // no children for non-layered or old format image
-    if (!ictx->features & RBD_FEATURE_LAYERING)
+    if ((ictx->features & RBD_FEATURE_LAYERING) == 0)
       return 0;
 
     parent_spec parent_spec(ictx->md_ctx.get_id(), ictx->id, ictx->snap_id);