Avoid strneq.

This commit is contained in:
Dave Love 1999-10-11 17:14:12 +00:00
parent 9c610b03c4
commit 9832d51d60

View file

@ -652,7 +652,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
/* 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 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
/* 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))
{