On Wed, Mar 13, 2013 at 12:40 AM, Antoine Pelisse <apelisse@xxxxxxxxx> wrote: >> --- a/dir.c >> +++ b/dir.c >> @@ -636,12 +636,14 @@ int match_basename(const char *basename, int basenamelen, >> int flags) >> { >> if (prefix == patternlen) { >> - if (!strcmp_icase(pattern, basename)) >> + if (patternlen == basenamelen && >> + !strncmp_icase(pattern, basename, patternlen)) >> return 1; >> } else if (flags & EXC_FLAG_ENDSWITH) { >> if (patternlen - 1 <= basenamelen && >> - !strcmp_icase(pattern + 1, >> - basename + basenamelen - patternlen + 1)) >> + !strncmp_icase(pattern + 1, >> + basename + basenamelen - patternlen + 1, >> + patternlen - 1)) >> return 1; > > > I can see that you kept strncmp(), was it worse with memcmp() ? One step at a time. 05/13 replace strncmp_icase with memcmp (for when ignore_case == 0). -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html