From e89e3925beb00ace45007e98d0d3fdfbcb47d7f9 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Mon, 14 May 2018 23:03:55 +0200 Subject: [PATCH] mon/PGMap.cc: cleanup, remove not needed variable 'r' Signed-off-by: Danny Al-Gaaf --- src/mon/PGMap.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index e8a9b4768e95..aba19b5f73a0 100644 --- a/src/mon/PGMap.cc +++ b/src/mon/PGMap.cc @@ -3024,7 +3024,6 @@ int process_pg_map_command( cmd_putval(g_ceph_context, cmdmap, "pool", pool); } - int r = 0; stringstream ds; if (prefix == "pg stat") { if (f) { @@ -3174,12 +3173,12 @@ int process_pg_map_command( cmd_getval(g_ceph_context, cmdmap, "threshold", threshold, g_conf->get_val("mon_pg_stuck_threshold")); - r = pg_map.dump_stuck_pg_stats(ds, f, (int)threshold, stuckop_vec); - odata->append(ds); - if (r < 0) + if (pg_map.dump_stuck_pg_stats(ds, f, (int)threshold, stuckop_vec) < 0) { *ss << "failed"; - else + } else { *ss << "ok"; + } + odata->append(ds); return 0; } -- 2.47.3