]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: http_htx: fix ci compilation error with isdigit for Windows
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 7 Jul 2021 15:17:39 +0000 (17:17 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 7 Jul 2021 15:23:57 +0000 (17:23 +0200)
The warning is encountered on platforms for which char type is signed by
default.

cf the following links
https://stackoverflow.com/questions/10186219/array-subscript-has-type-char

This must be backported up to 2.4.

src/http_htx.c

index 6c288f9f587449668ee53bd2eddbdbe376e2c162..399848db6e9aaf7bdcc34426595a8f781a37a85f 100644 (file)
@@ -1760,7 +1760,7 @@ int http_scheme_based_normalize(struct htx *htx)
        authority = http_get_authority(uri, 0);
        start = istptr(authority);
        end = istend(authority);
-       for (ptr = end; ptr > start && isdigit(*--ptr); )
+       for (ptr = end; ptr > start && isdigit((unsigned char)*--ptr); )
                ;
 
        /* if no port found, no normalization to proceed */