]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
filestore: Fix uninitialized return
authorAdam C. Emerson <aemerson@redhat.com>
Mon, 10 Apr 2017 19:59:30 +0000 (15:59 -0400)
committerAdam C. Emerson <aemerson@redhat.com>
Tue, 11 Apr 2017 01:57:14 +0000 (21:57 -0400)
In some error conditions we were returning the value of an
uninitialized variable.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/os/filestore/FileStore.cc

index 659ecda94495f3180b1f2e506f627c1601cdda9f..475d7f59481ad0938403d1b10e3e2d99b679e6c7 100644 (file)
@@ -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);