874f1688f1
- fix false positives for build option "-Werror=format-security"
29 lines
1.0 KiB
Diff
29 lines
1.0 KiB
Diff
diff --git a/match.c b/match.c
|
|
index 6cd656f..bf92d62 100644
|
|
--- a/match.c
|
|
+++ b/match.c
|
|
@@ -353,12 +353,12 @@ int cs; /* flag: force case-sensitive matching */
|
|
c = *(p-1);
|
|
else
|
|
{
|
|
- uch cc = (cs ? (uch)*s : case_map((uch)*s));
|
|
+ uch cc = (cs ? (uch)*s : to_up((uch)*s));
|
|
uch uc = (uch) c;
|
|
if (*(p+1) != '-')
|
|
for (uc = uc ? uc : (uch)*p; uc <= (uch)*p; uc++)
|
|
/* compare range */
|
|
- if ((cs ? uc : case_map(uc)) == cc)
|
|
+ if ((cs ? uc : to_up(uc)) == cc)
|
|
return r ? 0 : recmatch(q + CLEN(q), s + CLEN(s), cs);
|
|
c = e = 0; /* clear range, escape flags */
|
|
}
|
|
@@ -402,7 +402,7 @@ int cs; /* flag: force case-sensitive matching */
|
|
#endif /* def VMS */
|
|
|
|
/* Just a character--compare it */
|
|
- return (cs ? c == *s : case_map((uch)c) == case_map((uch)*s)) ?
|
|
+ return (cs ? c == *s : to_up((uch)c) == to_up((uch)*s)) ?
|
|
recmatch(p, s + CLEN(s), cs) : 0;
|
|
}
|
|
|