From: Danny Al-Gaaf Date: Thu, 28 Feb 2013 18:33:03 +0000 (+0100) Subject: librados/librados.cc: reduce scope of 'ret' in rados_objects_list_next() X-Git-Tag: v0.59~61^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a2b14cf64ee248166a9e56d3995519ebd278e123;p=ceph.git librados/librados.cc: reduce scope of 'ret' in rados_objects_list_next() Signed-off-by: Danny Al-Gaaf --- diff --git a/src/librados/librados.cc b/src/librados/librados.cc index 4dc4b1c3bc6..aace7d57500 100644 --- a/src/librados/librados.cc +++ b/src/librados/librados.cc @@ -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())