On Wed, Mar 13, 2013 at 12:40 AM, Antoine Pelisse 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,
> --- 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 provides length information, compared to strcmp, which could
be taken advantage by the implementation. Even better, we could check
if the lengths are equal before calling strncmp, eliminating a bit of
strncmp calls.
treat_leading_path: 0.000 0.000
read_directory: 3.558 3.578
+tre
3 matches
Mail list logo