OSDN Git Service

(main): Use new loop var J to avoid conflict with I.
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 3 Sep 1992 07:15:21 +0000 (07:15 +0000)
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 3 Sep 1992 07:15:21 +0000 (07:15 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@2043 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/gcc.c

index 6977414..b78990a 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -3197,6 +3197,7 @@ main (argc, argv)
      char **argv;
 {
   register int i;
+  int j;
   int value;
   int error_count = 0;
   int linker_was_run = 0;
@@ -3371,17 +3372,19 @@ main (argc, argv)
            input_suffix = "";
 
          len = 0;
-         for (i = 0; i < sizeof cp->spec / sizeof cp->spec[0] && cp->spec[i]; i++)
-           len += strlen (cp->spec[i]);
+         for (j = 0; j < sizeof cp->spec / sizeof cp->spec[0]; j++)
+           if (cp->spec[j])
+             len += strlen (cp->spec[j]);
 
          p = (char *) xmalloc (len + 1);
 
          len = 0;
-         for (i = 0; i < sizeof cp->spec / sizeof cp->spec[0] && cp->spec[i]; i++)
-           {
-             strcpy (p + len, cp->spec[i]);
-             len += strlen (cp->spec[i]);
-           }
+         for (j = 0; j < sizeof cp->spec / sizeof cp->spec[0]; j++)
+           if (cp->spec[j])
+             {
+               strcpy (p + len, cp->spec[j]);
+               len += strlen (cp->spec[j]);
+             }
 
          value = do_spec (p);
          free (p);