8000 inet_net_pton.c: use pg_ascii_tolower() rather than tolower(). · theory/postgres@8898082 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8898082

Browse files
committed
inet_net_pton.c: use pg_ascii_tolower() rather than tolower().
Avoid dependence on setlocale(). No behavior change. Discussion: https://postgr.es/m/9875f7f9-50f1-4b5d-86fc-ee8b03e8c162@eisentraut.org Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
1 parent 7a6880f commit 8898082

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/backend/utils/adt/inet_net_pton.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ inet_cidr_pton_ipv4(const char *src, u_char *dst, size_t size)
115115
src++; /* skip x or X. */
116116
while ((ch = *src++) != '\0' && isxdigit((unsigned char) ch))
117117
{
118-
if (isupper((unsigned char) ch))
119-
ch = tolower((unsigned char) ch);
118+
ch = pg_ascii_tolower((unsigned char) ch);
120119
n = strchr(xdigits, ch) - xdigits;
121120
assert(n >= 0 && n <= 15);
122121
if (dirty == 0)

0 commit comments

Comments
 (0)
0