]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG.cc: fix -Wparentheses
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 7 May 2014 16:00:10 +0000 (18:00 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 7 May 2014 16:00:10 +0000 (18:00 +0200)
Fix for:
warning: using the result of an assignment as  a condition
 without parentheses [-Wparentheses]

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/osd/ReplicatedPG.cc

index a4ddac10ad1810b79ae13adc4d4ebc02c51ecf7b..be71d6fcdd7f0c42d7f411a945ead783efcd1b43 100644 (file)
@@ -477,7 +477,8 @@ bool ReplicatedPG::maybe_await_blocked_snapset(
   OpRequestRef op)
 {
   ObjectContextRef obc;
-  if (obc = object_contexts.lookup(hoid.get_head())) {
+  obc = object_contexts.lookup(hoid.get_head());
+  if (obc) {
     if (obc->is_blocked()) {
       wait_for_blocked_object(obc->obs.oi.soid, op);
       return true;
@@ -485,7 +486,8 @@ bool ReplicatedPG::maybe_await_blocked_snapset(
       return false;
     }
   }
-  if (obc = object_contexts.lookup(hoid.get_snapdir())) {
+  obc = object_contexts.lookup(hoid.get_snapdir());
+  if (obc) {
     if (obc->is_blocked()) {
       wait_for_blocked_object(obc->obs.oi.soid, op);
       return true;