]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/PGMap.cc: cleanup, remove not needed variable 'r'
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 14 May 2018 21:03:55 +0000 (23:03 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 12 Jun 2018 21:14:15 +0000 (23:14 +0200)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/mon/PGMap.cc

index e8a9b4768e95147817551a730aed44aca09389bf..aba19b5f73a0f74c306ec99e0ace6f914c08a741 100644 (file)
@@ -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<int64_t>("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;
   }