From: Jeff King <peff@xxxxxxxx> Call fspathncmp() instead of open-coding it. This shortens the code and makes it less repetitive. Signed-off-by: René Scharfe <l.s.r@xxxxxx> --- >From https://lore.kernel.org/git/YSv1XZJvYdYj1JtP@xxxxxxxxxxxxxxxxxxxxxxx/ dir.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dir.c b/dir.c index 7d56d68355..28f4c6895b 100644 --- a/dir.c +++ b/dir.c @@ -669,9 +669,7 @@ int pl_hashmap_cmp(const void *cmp_data UNUSED, ? ee1->patternlen : ee2->patternlen; - if (ignore_case) - return strncasecmp(ee1->pattern, ee2->pattern, min_len); - return strncmp(ee1->pattern, ee2->pattern, min_len); + return fspathncmp(ee1->pattern, ee2->pattern, min_len); } static char *dup_and_filter_pattern(const char *pattern) -- 2.38.0