]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crush/CrushWrapper: clean up member init 21968/head
authorSage Weil <sage@redhat.com>
Tue, 24 Apr 2018 14:16:52 +0000 (09:16 -0500)
committerXiaoxi CHEN <xiaoxchen@ebay.com>
Mon, 14 May 2018 06:43:57 +0000 (23:43 -0700)
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 4bea8b55d35ac2dffcef10998b77357511863163)

src/crush/CrushWrapper.h

index 64e63760c7545019f5acc36b53318b4454025e8d..7c3d3a5b4e814ea9a6be59e49e92f483122d31fb 100644 (file)
@@ -73,12 +73,12 @@ public:
   std::map<int64_t, crush_choose_arg_map> choose_args;
 
 private:
-  struct crush_map *crush;
+  struct crush_map *crush = nullptr;
 
   bool have_uniform_rules = false;
 
   /* reverse maps */
-  mutable bool have_rmaps;
+  mutable bool have_rmaps = false;
   mutable std::map<string, int> type_rmap, name_rmap, rule_name_rmap;
   void build_rmaps() const {
     if (have_rmaps) return;
@@ -97,7 +97,7 @@ public:
   CrushWrapper(const CrushWrapper& other);
   const CrushWrapper& operator=(const CrushWrapper& other);
 
-  CrushWrapper() : crush(0), have_rmaps(false) {
+  CrushWrapper() {
     create();
   }
   ~CrushWrapper() {