From 013b2c95fe54e6e4c6cd59cc18f3ce79e8cf62d0 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sun, 14 Apr 2019 15:49:00 +0800 Subject: [PATCH] mds/MDSCache: init empty string_view with {} nullptr is not a valid null-terminated character sequence Signed-off-by: Kefu Chai --- src/mds/MDCache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mds/MDCache.h b/src/mds/MDCache.h index 29a1af01c6e..9898fc37c06 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); -- 2.39.5