From 8898082a5d3e94eef073f0e08124137e096e78ef Mon Sep 17 00:00:00 2001 From: Jeff Davis Date: Tue, 10 Jun 2025 11:23:20 -0700 Subject: 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 --- src/backend/utils/adt/inet_net_pton.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/backend') diff --git a/src/backend/utils/adt/inet_net_pton.c b/src/backend/utils/adt/inet_net_pton.c index ef2236d9f04..3b0db2a3799 100644 --- a/src/backend/utils/adt/inet_net_pton.c +++ b/src/backend/utils/adt/inet_net_pton.c @@ -115,8 +115,7 @@ inet_cidr_pton_ipv4(const char *src, u_char *dst, size_t size) src++; /* skip x or X. */ while ((ch = *src++) != '\0' && isxdigit((unsigned char) ch)) { - if (isupper((unsigned char) ch)) - ch = tolower((unsigned char) ch); + ch = pg_ascii_tolower((unsigned char) ch); n = strchr(xdigits, ch) - xdigits; assert(n >= 0 && n <= 15); if (dirty == 0) -- cgit v1.2.3