postgres.git / summary / log / commit / refs

commit    8898082a5d3e94eef073f0e08124137e096e78ef
Author:   Jeff Davis <jdavis@postgresql.org>
Date:     Tue Jun 10 18:23:20 2025 +0000
First released in: 18.0

    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>


src/backend/utils/adt/inet_net_pton.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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) [parent: 7a6880fadc17]