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

index 4a46b0c04a82b66a82a860c47d654ab35b6a13b3..dcae15375afa73f5d2de96d7dd2fe32e67cdebfe 100644 (file)
@@ -79,7 +79,6 @@ run()
   }
 
   RETURN1_IF_NONZERO(rados_connect(cl));
-  int ret;
 
   printf("%s: creating pool %s\n", get_id_str(), m_pool_name.c_str());
   rados_pool_create(cl, m_pool_name.c_str());
@@ -90,7 +89,7 @@ run()
     char oid[128];
     snprintf(oid, sizeof(oid), "%d%s", i, m_suffix.c_str());
     std::string buf(get_random_buf(256));
-    ret = rados_write(io_ctx, oid, buf.c_str(), buf.size(), 0);
+    int ret = rados_write(io_ctx, oid, buf.c_str(), buf.size(), 0);
     if (ret < static_cast<int>(buf.size())) {
       printf("%s: rados_write error %d\n", get_id_str(), ret);
       return ret;