From 5874b0f2444072b86b34ce50f12d0c37dc635ae6 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Sun, 8 Nov 2026 22:09:37 +0100 Subject: Silence x86 warnings, cast char before handing it to isspace --- src/ot_config.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ot_config.c b/src/ot_config.c index 8af6cfc..626ddea 100644 --- a/src/ot_config.c +++ b/src/ot_config.c @@ -126,7 +126,7 @@ static const char *set_config_option(const char **option, char *value) { #ifdef _DEBUG fprintf(stderr, "Setting config option: %s\n", value); #endif - while (isspace(*value)) + while (isspace((unsigned char)*value)) ++value; free((char *)*option); return *option = strdup(value); @@ -136,7 +136,7 @@ static int scan_ip6_port(const char *src, ot_ip6 ip, uint16_t *port) { const char *s = src; uint64_t value; int off, bracket = 0; - while (isspace(*s)) + while (isspace((unsigned char)*s)) ++s; if (*s == '[') ++s, ++bracket; /* for v6 style notation */ @@ -145,7 +145,7 @@ static int scan_ip6_port(const char *src, ot_ip6 ip, uint16_t *port) { s += off; if (bracket && *s == ']') ++s; - if (*s == 0 || isspace(*s)) + if (*s == 0 || isspace((unsigned char)*s)) return s - src; if (!ip_is_v4mapped(ip)) { if (*s != ':' && *s != '.') @@ -167,7 +167,7 @@ static int scan_ip6_net(const char *src, ot_net *net) { const char *s = src; uint64_t value; int off; - while (isspace(*s)) + while (isspace((unsigned char)*s)) ++s; if (!(off = ip_parse(s, net->address))) return 0; -- cgit v1.3