v1-0004-inet_net_pton.c-use-pg_ascii_tolower-rather-than-.patch
text/x-patch
Filename: v1-0004-inet_net_pton.c-use-pg_ascii_tolower-rather-than-.patch
Type: text/x-patch
Part: 3
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch v1-0004
Subject: inet_net_pton.c: use pg_ascii_tolower() rather than tolower().
| File | + | − |
|---|---|---|
| src/backend/utils/adt/inet_net_pton.c | 1 | 2 |
From d3bd2f24a9c450cbb2ff2f88f8efd4ba7c455be0 Mon Sep 17 00:00:00 2001
From: Jeff Davis <jeff@j-davis.com>
Date: Fri, 6 Jun 2025 10:06:01 -0700
Subject: [PATCH v1 4/8] inet_net_pton.c: use pg_ascii_tolower() rather than
tolower().
---
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)
--
2.43.0