]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* cppinit.c (init_standard_includes, parse_option): Use strncmp.
authorFrank Ch. Eigler <fche@redhat.com>
Sun, 6 Oct 2002 08:21:21 +0000 (08:21 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Sun, 6 Oct 2002 08:21:21 +0000 (08:21 +0000)
From-SVN: r57860

gcc/cppinit.c

index 7b7623bba9f10f3d857702bce442d9870bbe0eca..c7d50412f6ca01580eb9401efb56c10255e86091 100644 (file)
@@ -900,7 +900,7 @@ init_standard_includes (pfile)
                  && !CPP_OPTION (pfile, no_standard_cplusplus_includes)))
            {
              /* Does this dir start with the prefix?  */
-             if (!memcmp (p->fname, default_prefix, default_len))
+             if (!strncmp (p->fname, default_prefix, default_len))
                {
                  /* Yes; change prefix and add to search list.  */
                  int flen = strlen (p->fname);
@@ -1348,7 +1348,7 @@ parse_option (input)
       md = (mn + mx) / 2;
 
       opt_len = cl_options[md].opt_len;
-      comp = memcmp (input, cl_options[md].opt_text, opt_len);
+      comp = strncmp (input, cl_options[md].opt_text, opt_len);
 
       if (comp > 0)
        mn = md + 1;
@@ -1373,7 +1373,7 @@ parse_option (input)
              for (; mn < (unsigned int) N_OPTS; mn++)
                {
                  opt_len = cl_options[mn].opt_len;
-                 if (memcmp (input, cl_options[mn].opt_text, opt_len))
+                 if (strncmp (input, cl_options[mn].opt_text, opt_len))
                    break;
                  if (input[opt_len] == '\0')
                    return mn;