summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>2013-02-27 18:27:56 +0100
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>2013-02-27 18:27:56 +0100
commitafa811caa8178cf22c0a119a596f9d2f40225dc9 (patch)
treeac78ab55bcb520c58cbe53cbde5e78e3f79fbd09
parent9a40ab3afe2f6111c0741468a095eec419be5e53 (diff)
downloadceph-afa811caa8178cf22c0a119a596f9d2f40225dc9.tar.gz
CrushCompiler.cc: remove duplicate if/else branches
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>
-rw-r--r--src/crush/CrushCompiler.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/crush/CrushCompiler.cc b/src/crush/CrushCompiler.cc
index 5a9eb441b2c..c54a7b916e4 100644
--- a/src/crush/CrushCompiler.cc
+++ b/src/crush/CrushCompiler.cc
@@ -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";