From: Danny Al-Gaaf Date: Wed, 10 Jun 2015 09:28:01 +0000 (+0200) Subject: mon/MDSMonitor.cc: fix error handling in 'mds getmap' X-Git-Tag: v9.1.0~446^2~30 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a48286e1ebd666054a34233fe4bdf5872e535d66;p=ceph.git 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 --- diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index d588e14c304d..b04ea2d9ef0f 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);