]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/MDSCache: init empty string_view with {}
authorKefu Chai <kchai@redhat.com>
Sun, 14 Apr 2019 07:49:00 +0000 (15:49 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 17 Apr 2019 22:59:42 +0000 (06:59 +0800)
nullptr is not a valid null-terminated character sequence

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mds/MDCache.h

index 29a1af01c6e144c2ca736f609c45224d4476344b..9898fc37c0667b234474bcbd8f87041509013c83 100644 (file)
@@ -1264,7 +1264,7 @@ public:
 protected:
   int dump_cache(std::string_view fn, Formatter *f);
 public:
-  int dump_cache() { return dump_cache(NULL, NULL); }
+  int dump_cache() { return dump_cache({}, nullptr); }
   int dump_cache(std::string_view filename);
   int dump_cache(Formatter *f);
   void dump_tree(CInode *in, const int cur_depth, const int max_depth, Formatter *f);