]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test_disk_bw.cc: reduce scope of variable
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 22 Oct 2014 08:57:43 +0000 (10:57 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Sun, 26 Oct 2014 17:10:14 +0000 (18:10 +0100)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/test/old/test_disk_bw.cc

index 40d0df3fe8b3d53c2d8760ed1a6ef83c986d00c6..63b2a5f7b1d277e44a18d5804d8c3ef6522046a0 100644 (file)
@@ -19,7 +19,7 @@ using namespace std;
 int main(int argc, char **argv)
 {
   void   *buf;
-  int     fd, count, loop = 0, ret;
+  int     fd, count, loop = 0;
   
   if (argc != 4) {
     fprintf(stderr, "Usage: %s device bsize count\n", argv[0]);
@@ -41,7 +41,7 @@ int main(int argc, char **argv)
  
   utime_t start = ceph_clock_now(g_ceph_context);
   while (loop++ < count) {
-    ret = safe_write(fd, buf, bsize);
+    int ret = safe_write(fd, buf, bsize);
     if (ret)
       ceph_abort();
     //if ((loop % 100) == 0)