]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/librgw_file.cc: remove not needed variables
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Mon, 22 Feb 2016 13:54:36 +0000 (14:54 +0100)
committerSage Weil <sage@redhat.com>
Wed, 9 Nov 2016 19:44:57 +0000 (14:44 -0500)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/test/librgw_file.cc

index 5ed0cb4077f3c55ce6ab931df903364b3a4868b3..c623b56ec04c6bc6b5cf2b69c08ef0b473c688dc 100644 (file)
@@ -106,14 +106,12 @@ TEST(LibRGW, LOOKUP_BUCKETS) {
   if (! fs)
     return;
 
-  int ret = 0;
   for (auto& fid_row : bucket_matrix) {
     auto& fid = get<0>(fid_row);
     // auto& obj_vector = get<1>(fid_row);
     struct rgw_file_handle *rgw_fh = nullptr;
-    ret = rgw_lookup(fs, fs->root_fh, get<0>(fid).c_str(), &rgw_fh,
-                   0 /* flags */);
-    ASSERT_EQ(ret, 0);
+    ASSERT_EQ(0, rgw_lookup(fs, fs->root_fh, get<0>(fid).c_str(), &rgw_fh,
+                           0 /* flags */));
     get<2>(fid) = rgw_fh;
     ASSERT_NE(get<2>(fid), nullptr);
   }
@@ -126,14 +124,12 @@ TEST(LibRGW, GETATTR_BUCKETS) {
     if (! fs)
       return;
 
-    int ret = 0;
     struct stat st;
 
     for (auto& fid_row : bucket_matrix) {
       auto& fid = get<0>(fid_row);
       struct rgw_file_handle *rgw_fh = get<2>(fid);
-      ret = rgw_getattr(fs, rgw_fh, &st, RGW_GETATTR_FLAG_NONE);
-      ASSERT_EQ(ret, 0);
+      ASSERT_EQ(0, rgw_getattr(fs, rgw_fh, &st, RGW_GETATTR_FLAG_NONE));
     }
   }
 }