]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: proper set resulting pnext to avoid returning local var 11533/head
authorIgor Fedotov <ifedotov@mirantis.com>
Tue, 18 Oct 2016 13:50:17 +0000 (13:50 +0000)
committerIgor Fedotov <ifedotov@mirantis.com>
Tue, 18 Oct 2016 13:50:17 +0000 (13:50 +0000)
Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
src/os/bluestore/BlueStore.cc

index 26b3490126524927b27da10d1b4b90bd6b009cfb..625b7f961a317cc8418e2dee1a76af4cc8f55c67 100644 (file)
@@ -5459,7 +5459,6 @@ int BlueStore::_collection_list(
 
   if (start == ghobject_t::get_max() ||
     start.hobj.is_max()) {
-    *pnext = ghobject_t::get_max();
     goto out;
   }
   get_coll_key_range(c->cid, c->cnode.bits, &temp_start_key, &temp_end_key,
@@ -5541,11 +5540,11 @@ int BlueStore::_collection_list(
     ls->push_back(oid);
     it->next();
   }
+out:
   if (!set_next) {
     *pnext = ghobject_t::get_max();
   }
 
-out:
   return r;
 }