]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/unittest_librbd: Useless variables 15720/head
authorshiqi <1454927420@qq.com>
Fri, 16 Jun 2017 02:34:25 +0000 (10:34 +0800)
committershiqi <1454927420@qq.com>
Fri, 16 Jun 2017 02:34:25 +0000 (10:34 +0800)
Signed-off-by: shiqi <1454927420@qq.com>
src/test/librbd/test_librbd.cc

index 0fe8cc0281bf855e61f923a6c33d98ae92ef0d95..67024d7d21a4053871794bd5697c2e48f62bc47f 100644 (file)
@@ -1982,13 +1982,13 @@ void aio_read_test_data(librbd::Image& image, const char *expected, off_t off, s
 
 void read_test_data(librbd::Image& image, const char *expected, off_t off, size_t expected_len, uint32_t iohint, bool *passed)
 {
-  int read, total_read = 0;
+  int read;
   size_t len = expected_len;
   ceph::bufferlist bl;
   if (iohint)
-    read = image.read2(off + total_read, len, bl, iohint);
+    read = image.read2(off, len, bl, iohint);
   else
-    read = image.read(off + total_read, len, bl);
+    read = image.read(off, len, bl);
   ASSERT_TRUE(read >= 0);
   std::string bl_str(bl.c_str(), read);