sys-file-info: Avoid duplicate variable name in inner scope. 20131223030506/pspp
authorBen Pfaff <blp@cs.stanford.edu>
Tue, 19 Nov 2013 06:57:27 +0000 (22:57 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Mon, 23 Dec 2013 02:29:41 +0000 (18:29 -0800)
No actual harm done in this case, I think, but still bad form.

src/language/dictionary/sys-file-info.c

index d26c236e8f026337e31e01b1fe02489375108842..6f73d8316595510499de223931ad45698331f9ab 100644 (file)
@@ -406,19 +406,19 @@ display_attributes (struct tab_table *t, const struct attrset *set, int flags,
       const struct attribute *attr = attrs[i];
       const char *name = attribute_get_name (attr);
       size_t n_values;
-      size_t i;
+      size_t j;
 
       if (!(flags & DF_AT_ATTRIBUTES) && is_at_name (name))
         continue;
 
       n_values = attribute_get_n_values (attr);
-      for (i = 0; i < n_values; i++)
+      for (j = 0; j < n_values; j++)
         {
           if (n_values > 1)
-            tab_text_format (t, c, r, TAB_LEFT, "%s[%zu]", name, i + 1);
+            tab_text_format (t, c, r, TAB_LEFT, "%s[%zu]", name, j + 1);
           else
             tab_text (t, c, r, TAB_LEFT, name);
-          tab_text (t, c + 1, r, TAB_LEFT, attribute_get_value (attr, i));
+          tab_text (t, c + 1, r, TAB_LEFT, attribute_get_value (attr, j));
           r++;
         }
     }