diff options
author | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2013-05-15 14:59:11 +0200 |
---|---|---|
committer | Danny Al-Gaaf <danny.al-gaaf@bisect.de> | 2013-05-16 14:20:09 +0200 |
commit | d226d9c36cc6f99b1b7650763876017a38e4ba9f (patch) | |
tree | 755c14f35530c37f3d58878152eb392f1bfd342c /src/test/system | |
parent | test/librbd/test_librbd.cc: reduce scope of several variables (diff) | |
download | ceph-d226d9c36cc6f99b1b7650763876017a38e4ba9f.tar.xz ceph-d226d9c36cc6f99b1b7650763876017a38e4ba9f.zip |
test/system/rados_list_parallel.cc: reduce scope of 'ret'
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Diffstat (limited to 'src/test/system')
-rw-r--r-- | src/test/system/rados_list_parallel.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/test/system/rados_list_parallel.cc b/src/test/system/rados_list_parallel.cc index 77df29e0e79..a1c6e270265 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); |