]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
test/system/rados_list_parallel.cc: reduce scope of 'ret'
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 15 May 2013 12:59:11 +0000 (14:59 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 16 May 2013 12:20:09 +0000 (14:20 +0200)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/test/system/rados_list_parallel.cc

index 77df29e0e79aa169d14d52bbc86aaf734433e10d..a1c6e270265dcdb1f2e71cdae4e73e41df5e5ec9 100644 (file)
@@ -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);