From a2b14cf64ee248166a9e56d3995519ebd278e123 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Thu, 28 Feb 2013 19:33:03 +0100 Subject: [PATCH] librados/librados.cc: reduce scope of 'ret' in rados_objects_list_next() Signed-off-by: Danny Al-Gaaf --- src/librados/librados.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/librados/librados.cc b/src/librados/librados.cc index 4dc4b1c3bc6d..aace7d57500f 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()) -- 2.47.3