summaryrefslogtreecommitdiffstats
path: root/src/mon/HealthMonitor.cc
diff options
context:
space:
mode:
authorKefu Chai <kchai@redhat.com>2021-05-20 05:00:06 +0200
committerKefu Chai <kchai@redhat.com>2021-05-22 18:31:09 +0200
commite29f1a5ec16c00f70c7b505769fbefe98db03d1b (patch)
treeb451c999e4456fdd06200f64f1b6863cd2ba0838 /src/mon/HealthMonitor.cc
parentcommon/cmdparse: use map::find() only a single time (diff)
downloadceph-e29f1a5ec16c00f70c7b505769fbefe98db03d1b.tar.xz
ceph-e29f1a5ec16c00f70c7b505769fbefe98db03d1b.zip
common/cmdparse: return cmd option using return value
instead of - always returning "true" - returning using an input parameter just return the value with retval. simpler this way. Signed-off-by: Kefu Chai <kchai@redhat.com>
Diffstat (limited to 'src/mon/HealthMonitor.cc')
-rw-r--r--src/mon/HealthMonitor.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mon/HealthMonitor.cc b/src/mon/HealthMonitor.cc
index ae92e8b7752..bf8cf394bd9 100644
--- a/src/mon/HealthMonitor.cc
+++ b/src/mon/HealthMonitor.cc
@@ -280,8 +280,7 @@ bool HealthMonitor::prepare_command(MonOpRequestRef op)
return true;
}
- string format;
- cmd_getval(cmdmap, "format", format, string("plain"));
+ string format = cmd_getval_or<string>(cmdmap, "format", "plain");
boost::scoped_ptr<Formatter> f(Formatter::create(format));
string prefix;