]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
erasure-code/shec/shec.cc: reduce scope of variables
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 24 Feb 2015 09:43:57 +0000 (10:43 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 24 Feb 2015 09:43:57 +0000 (10:43 +0100)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/erasure-code/shec/shec.cc

index 95225550c00099211f3e7a8560cac44d5619764e..3b375b2b32cd6172e05afa55fb4fff2b115b6c8c 100644 (file)
@@ -84,14 +84,13 @@ int *shec_reedsolomon_coding_matrix(int k, int m, int c, int w, int is_single)
 {
   int *matrix;
   int rr, cc, start, end;
-  int m1, m2, c1, c2, c1_best = -1, m1_best = -1;
-  double min_r_e1;
+  int m1, m2, c1, c2;
 
   if (w != 8 && w != 16 && w != 32) return NULL;
 
   if (!is_single){
-
-    min_r_e1 = 100.0;
+    int c1_best = -1, m1_best = -1;
+    double min_r_e1 = 100.0;
 
     // create all multiple shec pattern and choose best.