]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
CrushCompiler.cc: remove duplicate if/else branches
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 27 Feb 2013 17:27:56 +0000 (18:27 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 27 Feb 2013 17:27:56 +0000 (18:27 +0100)
Fix duplicate content of a if/else branch. Remove the
complete if/else around the content.

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

index 5a9eb441b2c1127336cf0118a1007ae82738edf3..c54a7b916e4e140ba9272d548f6dad0259659535 100644 (file)
@@ -100,12 +100,9 @@ int CrushCompiler::decompile_bucket_impl(int i, ostream &out)
     print_item_name(out, item, crush);
     out << " weight ";
     print_fixedpoint(out, w);
-    if (dopos) {
-      if (alg == CRUSH_BUCKET_TREE)
-       out << " pos " << j;
-      else
-       out << " pos " << j;
-    }
+    if (dopos) 
+      out << " pos " << j;
+    
     out << "\n";
   }
   out << "}\n";