Fix for:
[src/mon/PGMonitor.cc:1667] -> [src/mon/PGMonitor.cc:1669]: (performance)
Variable 'r' is reassigned a value before the old one has been used.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
int64_t(g_conf->mon_pg_stuck_threshold));
r = dump_stuck_pg_stats(ds, f.get(), (int)threshold, stuckop_vec);
- ss << "ok";
+ if (r < 0)
+ ss << "failed";
+ else
+ ss << "ok";
r = 0;
} else if (prefix == "pg map") {
pg_t pgid;
stuck_types |= PGMap::STUCK_STALE;
else {
ds << "Unknown type: " << *i << std::endl;
- return 0;
+ return -EINVAL;
}
}