From a48286e1ebd666054a34233fe4bdf5872e535d66 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Wed, 10 Jun 2015 11:28:01 +0200 Subject: [PATCH] mon/MDSMonitor.cc: fix error handling in 'mds getmap' Fix for: CID 1297889 (#1 of 1): Unused value (UNUSED_VALUE) assigned_value: Assigning value -2 to r here, but that stored value is overwritten before it can be used. Signed-off-by: Danny Al-Gaaf --- src/mon/MDSMonitor.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index d588e14c304..b04ea2d9ef0 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -830,12 +830,13 @@ bool MDSMonitor::preprocess_command(MonOpRequestRef op) mm.decode(b); mm.encode(rdata, m->get_connection()->get_features()); ss << "got mdsmap epoch " << mm.get_epoch(); + r = 0; } } else { mdsmap.encode(rdata, m->get_connection()->get_features()); ss << "got mdsmap epoch " << mdsmap.get_epoch(); + r = 0; } - r = 0; } else if (prefix == "mds tell") { string whostr; cmd_getval(g_ceph_context, cmdmap, "who", whostr); -- 2.47.3