From: Shinobu Kinjo Date: Mon, 20 Nov 2017 06:28:47 +0000 (-0500) Subject: mon/MonmapMonitor: [Cleanup] Revmove redundant access specifier, etc X-Git-Tag: v13.0.2~694^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c97cf40cb47d14dc67fe57a8172c270d0c10905e;p=ceph.git mon/MonmapMonitor: [Cleanup] Revmove redundant access specifier, etc Signed-off-by: Shinobu Kinjo --- diff --git a/src/mon/MonmapMonitor.cc b/src/mon/MonmapMonitor.cc index fae36d6177f..88e5e1731a3 100644 --- a/src/mon/MonmapMonitor.cc +++ b/src/mon/MonmapMonitor.cc @@ -281,7 +281,7 @@ bool MonmapMonitor::preprocess_command(MonOpRequestRef op) p->decode(bl); } - assert(p != NULL); + assert(p); if (prefix == "mon getmap") { p->encode(rdata, m->get_connection()->get_features()); @@ -308,8 +308,10 @@ bool MonmapMonitor::preprocess_command(MonOpRequestRef op) rdata.append(ds); ss << "dumped monmap epoch " << p->get_epoch(); } - if (p != mon->monmap) + if (p != mon->monmap) { delete p; + p = nullptr; + } } else if (prefix == "mon feature ls") { diff --git a/src/mon/MonmapMonitor.h b/src/mon/MonmapMonitor.h index e3e01173b6e..360b7c73deb 100644 --- a/src/mon/MonmapMonitor.h +++ b/src/mon/MonmapMonitor.h @@ -22,8 +22,6 @@ #include #include -using namespace std; - #include "include/types.h" #include "msg/Messenger.h" @@ -80,8 +78,6 @@ class MonmapMonitor : public PaxosService { private: void check_subs(); - -private: bufferlist monmap_bl; };