From 25a681bb1c9b4a608fbd53f7746a084495e9396b Mon Sep 17 00:00:00 2001 From: "Adam C. Emerson" Date: Mon, 10 Apr 2017 15:59:30 -0400 Subject: [PATCH] filestore: Fix uninitialized return In some error conditions we were returning the value of an uninitialized variable. Signed-off-by: Adam C. Emerson --- src/os/filestore/FileStore.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/filestore/FileStore.cc b/src/os/filestore/FileStore.cc index 659ecda94495f..475d7f59481ad 100644 --- a/src/os/filestore/FileStore.cc +++ b/src/os/filestore/FileStore.cc @@ -4834,7 +4834,7 @@ int FileStore::collection_bits(const coll_t& c) int32_t bits; int fd = ::open(fn, O_RDONLY); if (fd < 0) { - r = -errno; + bits = r = -errno; goto out; } get_attrname("bits", n, PATH_MAX); -- 2.39.5