From: Kefu Chai Date: Sun, 14 Apr 2019 07:49:00 +0000 (+0800) Subject: mds/MDSCache: init empty string_view with {} X-Git-Tag: v15.1.0~2896^2~11 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=013b2c95fe54e6e4c6cd59cc18f3ce79e8cf62d0;p=ceph.git mds/MDSCache: init empty string_view with {} nullptr is not a valid null-terminated character sequence Signed-off-by: Kefu Chai --- diff --git a/src/mds/MDCache.h b/src/mds/MDCache.h index 29a1af01c6e1..9898fc37c066 100644 --- a/src/mds/MDCache.h +++ b/src/mds/MDCache.h @@ -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);