From: Danny Al-Gaaf Date: Wed, 22 Oct 2014 08:51:30 +0000 (+0200) Subject: TestErasureCodeIsa.cc: reduce scope of 'err' variable X-Git-Tag: v0.88~22^2~24 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5e9492c438e1450b421247d98fef425c4c8f7baa;p=ceph.git TestErasureCodeIsa.cc: reduce scope of 'err' variable Signed-off-by: Danny Al-Gaaf --- diff --git a/src/test/erasure-code/TestErasureCodeIsa.cc b/src/test/erasure-code/TestErasureCodeIsa.cc index cf8902680de..b53a482f831 100644 --- a/src/test/erasure-code/TestErasureCodeIsa.cc +++ b/src/test/erasure-code/TestErasureCodeIsa.cc @@ -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 degraded = encoded; set 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 degraded = encoded; set 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 degraded = encoded; set 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 degraded = encoded; set want_to_decode; + bool err = true; degraded.erase(l1); want_to_decode.insert(l1); err = DecodeAndVerify(Isa, degraded, want_to_decode, enc, length);