From: Danny Al-Gaaf Date: Mon, 14 May 2018 21:03:55 +0000 (+0200) Subject: mon/PGMap.cc: cleanup, remove not needed variable 'r' X-Git-Tag: v14.0.1~984^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e89e3925beb00ace45007e98d0d3fdfbcb47d7f9;p=ceph.git mon/PGMap.cc: cleanup, remove not needed variable 'r' Signed-off-by: Danny Al-Gaaf --- 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; }