Fix minor portability issue in pg_resetwal.c.
authorTom Lane <[email protected]>
Tue, 9 Dec 2025 00:06:36 +0000 (19:06 -0500)
committerTom Lane <[email protected]>
Tue, 9 Dec 2025 00:06:36 +0000 (19:06 -0500)
The argument of isspace() (like other <ctype.h> functions)
must be cast to unsigned char to ensure portable results.

Per NetBSD buildfarm members.  Oversight in 636c1914b.

src/bin/pg_resetwal/pg_resetwal.c

index c667a11cb6a1202cc09037a0881be86d4125976d..07c95f9ab808bcc56cb57d5299f7dfdc4737c8a0 100644 (file)
@@ -1246,7 +1246,7 @@ strtouint32_strict(const char *restrict s, char **restrict endptr, int base)
        bool            is_neg;
 
        /* skip leading whitespace */
-       while (isspace(*s))
+       while (isspace((unsigned char) *s))
                s++;
 
        /*