From: Danny Al-Gaaf Date: Wed, 15 May 2013 12:59:11 +0000 (+0200) Subject: test/system/rados_list_parallel.cc: reduce scope of 'ret' X-Git-Tag: v0.64~119^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d226d9c36cc6f99b1b7650763876017a38e4ba9f;p=ceph.git test/system/rados_list_parallel.cc: reduce scope of 'ret' Signed-off-by: Danny Al-Gaaf --- diff --git a/src/test/system/rados_list_parallel.cc b/src/test/system/rados_list_parallel.cc index 77df29e0e79a..a1c6e270265d 100644 --- a/src/test/system/rados_list_parallel.cc +++ b/src/test/system/rados_list_parallel.cc @@ -58,7 +58,6 @@ public: int run(void) { - int ret; rados_t cl; RETURN1_IF_NONZERO(rados_create(&cl, NULL)); rados_conf_parse_argv(cl, m_argc, m_argv); @@ -94,7 +93,7 @@ public: } std::string oid(d->second); to_delete.erase(d); - ret = rados_remove(io_ctx, oid.c_str()); + int ret = rados_remove(io_ctx, oid.c_str()); if (ret != 0) { printf("%s: rados_remove(%s) failed with error %d\n", get_id_str(), oid.c_str(), ret); @@ -139,7 +138,6 @@ public: int run(void) { - int ret; rados_t cl; RETURN1_IF_NONZERO(rados_create(&cl, NULL)); rados_conf_parse_argv(cl, m_argc, m_argv); @@ -177,7 +175,7 @@ public: to_add.erase(d); std::string buf(StRadosCreatePool::get_random_buf(256)); - ret = rados_write(io_ctx, oid.c_str(), buf.c_str(), buf.size(), 0); + int ret = rados_write(io_ctx, oid.c_str(), buf.c_str(), buf.size(), 0); if (ret != (int)buf.size()) { printf("%s: rados_write(%s) failed with error %d\n", get_id_str(), oid.c_str(), ret);