Mercurial > emacs
diff lib-src/getopt.c @ 25980:cef61b080859
Avoid strneq.
| author | Dave Love <fx@gnu.org> |
|---|---|
| date | Mon, 11 Oct 1999 17:14:12 +0000 |
| parents | 1a697e2604c3 |
| children | 134b57acef68 |
line wrap: on
line diff
--- a/lib-src/getopt.c Mon Oct 11 09:53:03 1999 +0000 +++ b/lib-src/getopt.c Mon Oct 11 17:14:12 1999 +0000 @@ -652,7 +652,7 @@ /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) - if (strneq (p->name, nextchar, nameend - nextchar)) + if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == (unsigned int) strlen (p->name)) @@ -839,7 +839,7 @@ /* Test all long options for either exact match or abbreviated matches. */ for (p = longopts, option_index = 0; p->name; p++, option_index++) - if (strneq (p->name, nextchar, nameend - nextchar)) + if (!strncmp (p->name, nextchar, nameend - nextchar)) { if ((unsigned int) (nameend - nextchar) == strlen (p->name)) {
