]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: tools: fix minor build issue on isspace()
authorWilly Tarreau <w@1wt.eu>
Thu, 1 Oct 2020 16:04:40 +0000 (18:04 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 1 Oct 2020 16:05:48 +0000 (18:05 +0200)
Previous commit fa41cb679 ("MINOR: tools: support for word expansion
of environment in parse_line") introduced two new isspace() on a char
and broke the build on systems using an array disguised in a macro
instead of a function (like cygwin). Just use the usual cast.

src/tools.c

index c2a96642dd71fbb877a5755cae8e88c797667818..75dfef121e1173163a1f09e5937cdaedde6a8540 100644 (file)
@@ -5118,7 +5118,7 @@ uint32_t parse_line(char *in, char *out, size_t *outlen, char **args, int *nbarg
                        if (value) {
                                while (*value) {
                                        /* expand as individual parameters on a space character */
-                                       if (word_expand && isspace(*value)) {
+                                       if (word_expand && isspace((unsigned char)*value)) {
                                                EMIT_CHAR(0);
                                                ++arg;
                                                if (arg < argsmax)
@@ -5127,7 +5127,7 @@ uint32_t parse_line(char *in, char *out, size_t *outlen, char **args, int *nbarg
                                                        err |= PARSE_ERR_TOOMANY;
 
                                                /* skip consecutive spaces */
-                                               while (isspace(*++value))
+                                               while (isspace((unsigned char)*++value))
                                                        ;
                                        } else {
                                                EMIT_CHAR(*value++);