OSDN Git Service

avoid shadow
authorSHIRAKATA Kentaro <argrath@ub32.org>
Sat, 13 Oct 2018 16:55:59 +0000 (01:55 +0900)
committerSHIRAKATA Kentaro <argrath@ub32.org>
Sat, 15 Dec 2018 19:48:52 +0000 (04:48 +0900)
src/topten.c

index 37499ec..c0b04d3 100644 (file)
@@ -1268,16 +1268,16 @@ char **argv;
         playerct = --argc;
         players = (const char **) ++argv;
 #else
-        int i;
+        int j;
         playerct = --argc;
         ++argv;
         players = (const char **)alloc(sizeof(char *) * argc + 1);
-        for (i = 0; i < argc; i++) {
-            char *p = (char *)str2ic(argv[i]);
-            players[i] = (char *)alloc(strlen(p) + 1);
-            strcpy((void *)players[i], p);
+        for (j = 0; j < argc; j++) {
+            char *p = (char *)str2ic(argv[j]);
+            players[j] = (char *)alloc(strlen(p) + 1);
+            strcpy((void *)players[j], p);
         }
-        players[i] = NULL;
+        players[j] = NULL;
 #endif
     }
     raw_print("");