diff options
author | Frank Ch. Eigler <fche@redhat.com> | 2002-10-06 11:21:09 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2002-10-06 11:21:09 +0000 |
commit | 7c7c549e2c2cd3c98438954c85ce98c0d78d33ae (patch) | |
tree | 543d9e01ba8a5031db9da8bb3533eb6aa42bcec1 /gcc/cppinit.c | |
parent | 23ee91599306d833f18fae8f1ca1cb82adc7664a (diff) | |
download | gcc-7c7c549e2c2cd3c98438954c85ce98c0d78d33ae.zip gcc-7c7c549e2c2cd3c98438954c85ce98c0d78d33ae.tar.gz gcc-7c7c549e2c2cd3c98438954c85ce98c0d78d33ae.tar.bz2 |
cppinit.c (init_standard_includes, [...]): Use strncmp.
* cppinit.c (init_standard_includes, parse_option): Use strncmp.
* c-opts.c (find_opt): Similarly.
From-SVN: r57864
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r-- | gcc/cppinit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c index 8ec1b0e..82b3056 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -808,7 +808,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); @@ -1229,7 +1229,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; @@ -1254,7 +1254,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; |