diff options
| author | Dirk Engling <erdgeist@erdgeist.org> | 2026-11-08 22:09:37 +0100 |
|---|---|---|
| committer | Dirk Engling <erdgeist@erdgeist.org> | 2026-11-08 22:09:37 +0100 |
| commit | 5874b0f2444072b86b34ce50f12d0c37dc635ae6 (patch) | |
| tree | 111776221fec43e2759bf33289c5061193f4bd8c | |
| parent | fb1e6bfb548ac6791bd8e7a01c8d2faeb94143cd (diff) | |
Silence x86 warnings, cast char before handing it to isspace
| -rw-r--r-- | src/ot_config.c | 8 |
1 files 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) { | |||
| 126 | #ifdef _DEBUG | 126 | #ifdef _DEBUG |
| 127 | fprintf(stderr, "Setting config option: %s\n", value); | 127 | fprintf(stderr, "Setting config option: %s\n", value); |
| 128 | #endif | 128 | #endif |
| 129 | while (isspace(*value)) | 129 | while (isspace((unsigned char)*value)) |
| 130 | ++value; | 130 | ++value; |
| 131 | free((char *)*option); | 131 | free((char *)*option); |
| 132 | return *option = strdup(value); | 132 | return *option = strdup(value); |
| @@ -136,7 +136,7 @@ static int scan_ip6_port(const char *src, ot_ip6 ip, uint16_t *port) { | |||
| 136 | const char *s = src; | 136 | const char *s = src; |
| 137 | uint64_t value; | 137 | uint64_t value; |
| 138 | int off, bracket = 0; | 138 | int off, bracket = 0; |
| 139 | while (isspace(*s)) | 139 | while (isspace((unsigned char)*s)) |
| 140 | ++s; | 140 | ++s; |
| 141 | if (*s == '[') | 141 | if (*s == '[') |
| 142 | ++s, ++bracket; /* for v6 style notation */ | 142 | ++s, ++bracket; /* for v6 style notation */ |
| @@ -145,7 +145,7 @@ static int scan_ip6_port(const char *src, ot_ip6 ip, uint16_t *port) { | |||
| 145 | s += off; | 145 | s += off; |
| 146 | if (bracket && *s == ']') | 146 | if (bracket && *s == ']') |
| 147 | ++s; | 147 | ++s; |
| 148 | if (*s == 0 || isspace(*s)) | 148 | if (*s == 0 || isspace((unsigned char)*s)) |
| 149 | return s - src; | 149 | return s - src; |
| 150 | if (!ip_is_v4mapped(ip)) { | 150 | if (!ip_is_v4mapped(ip)) { |
| 151 | if (*s != ':' && *s != '.') | 151 | if (*s != ':' && *s != '.') |
| @@ -167,7 +167,7 @@ static int scan_ip6_net(const char *src, ot_net *net) { | |||
| 167 | const char *s = src; | 167 | const char *s = src; |
| 168 | uint64_t value; | 168 | uint64_t value; |
| 169 | int off; | 169 | int off; |
| 170 | while (isspace(*s)) | 170 | while (isspace((unsigned char)*s)) |
| 171 | ++s; | 171 | ++s; |
| 172 | if (!(off = ip_parse(s, net->address))) | 172 | if (!(off = ip_parse(s, net->address))) |
| 173 | return 0; | 173 | return 0; |
