]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librados/librados.cc: reduce scope of 'ret' in rados_objects_list_next()
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 28 Feb 2013 18:33:03 +0000 (19:33 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 28 Feb 2013 18:33:03 +0000 (19:33 +0100)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/librados/librados.cc

index 4dc4b1c3bc6d91cdb8d038975afdf2ed117ea315..aace7d57500f5550bf29fad6e92e5bad1caa549b 100644 (file)
@@ -2055,7 +2055,6 @@ extern "C" int rados_objects_list_next(rados_list_ctx_t listctx, const char **en
 {
   librados::ObjListCtx *lh = (librados::ObjListCtx *)listctx;
   Objecter::ListContext *h = lh->lc;
-  int ret;
 
   // if the list is non-empty, this method has been called before
   if (!h->list.empty())
@@ -2063,7 +2062,7 @@ extern "C" int rados_objects_list_next(rados_list_ctx_t listctx, const char **en
     h->list.pop_front();
 
   if (h->list.empty()) {
-    ret = lh->ctx->list(lh->lc, RADOS_LIST_MAX_ENTRIES);
+    int ret = lh->ctx->list(lh->lc, RADOS_LIST_MAX_ENTRIES);
     if (ret < 0)
       return ret;
     if (h->list.empty())