]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
TestErasureCodeIsa.cc: reduce scope of 'err' variable
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Wed, 22 Oct 2014 08:51:30 +0000 (10:51 +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/erasure-code/TestErasureCodeIsa.cc

index cf8902680dee0f983a28e56a9ce935765a1d72f8..b53a482f831b86eaeaf4787fce63103a74c02aa5 100644 (file)
@@ -1,3 +1,4 @@
+// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 /*
  * Ceph - scalable distributed file system
  *
@@ -465,12 +466,12 @@ TEST_F(IsaErasureCodeTest, isa_vandermonde_exhaustive)
   }
 
   // loop through all possible loss scenarios
-  bool err = true;
   int cnt_cf = 0;
 
   for (int l1 = 0; l1 < (k + m); l1++) {
     map<int, bufferlist> degraded = encoded;
     set<int> want_to_decode;
+    bool err = true;
     degraded.erase(l1);
     want_to_decode.insert(l1);
     err = DecodeAndVerify(Isa, degraded, want_to_decode, enc, length);
@@ -592,12 +593,12 @@ TEST_F(IsaErasureCodeTest, isa_cauchy_exhaustive)
   }
 
   // loop through all possible loss scenarios
-  bool err = true;
   int cnt_cf = 0;
 
   for (int l1 = 0; l1 < (k + m); l1++) {
     map<int, bufferlist> degraded = encoded;
     set<int> want_to_decode;
+    bool err = true;
     degraded.erase(l1);
     want_to_decode.insert(l1);
     err = DecodeAndVerify(Isa, degraded, want_to_decode, enc, length);
@@ -719,12 +720,12 @@ TEST_F(IsaErasureCodeTest, isa_cauchy_cache_trash)
   }
 
   // loop through all possible loss scenarios
-  bool err = true;
   int cnt_cf = 0;
 
   for (int l1 = 0; l1 < (k + m); l1++) {
     map<int, bufferlist> degraded = encoded;
     set<int> want_to_decode;
+    bool err = true;
     degraded.erase(l1);
     want_to_decode.insert(l1);
     err = DecodeAndVerify(Isa, degraded, want_to_decode, enc, length);
@@ -845,12 +846,12 @@ TEST_F(IsaErasureCodeTest, isa_xor_codec)
   }
 
   // loop through all possible loss scenarios
-  bool err = true;
   int cnt_cf = 0;
 
   for (int l1 = 0; l1 < (k + m); l1++) {
     map<int, bufferlist> degraded = encoded;
     set<int> want_to_decode;
+    bool err = true;
     degraded.erase(l1);
     want_to_decode.insert(l1);
     err = DecodeAndVerify(Isa, degraded, want_to_decode, enc, length);