kore

Kore is a web application platform for writing scalable, concurrent web based processes in C or Python.
Commits | Files | Refs | README | LICENSE | git clone https://git.kore.io/kore.git

commit 1296802e06d15a9b78b35c9f1133b1f4fe366c3d
parent 36e99072f3784a81a791ea5e908668cb923024c8
Author: Joris Vink <joris@coders.se>
Date:   Tue,  7 Feb 2017 22:06:14 +0100

fixup isspace arguments.

Diffstat:
src/auth.c | 2+-
src/http.c | 4++--
src/utils.c | 6+++---
3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/auth.c b/src/auth.c @@ -118,7 +118,7 @@ kore_auth_cookie(struct http_request *req, struct kore_auth *auth) slen = strlen(auth->value); v = kore_split_string(cookie, ";", cookies, HTTP_MAX_COOKIES); for (i = 0; i < v; i++) { - for (c = cookies[i]; isspace(*c); c++) + for (c = cookies[i]; isspace(*(unsigned char *)c); c++) ; len = MIN(slen, strlen(cookies[i])); diff --git a/src/http.c b/src/http.c @@ -1350,7 +1350,7 @@ multipart_parse_headers(struct http_request *req, struct kore_buf *in, if (strcasecmp(args[0], "content-disposition")) continue; - for (d = args[1]; isspace(*d); d++) + for (d = args[1]; isspace(*(unsigned char *)d); d++) ; c = kore_split_string(d, ";", opt, 5); @@ -1374,7 +1374,7 @@ multipart_parse_headers(struct http_request *req, struct kore_buf *in, continue; } - for (d = opt[2]; isspace(*d); d++) + for (d = opt[2]; isspace(*(unsigned char *)d); d++) ; if (!strncasecmp(d, "filename=", 9)) { diff --git a/src/utils.c b/src/utils.c @@ -535,10 +535,10 @@ kore_text_trim(char *string, size_t len) return (string); end = (string + len) - 1; - while (isspace(*string) && string < end) + while (isspace(*(unsigned char *)string) && string < end) string++; - while (isspace(*end) && end > string) + while (isspace(*(unsigned char *)end) && end > string) *(end)-- = '\0'; return (string); @@ -555,7 +555,7 @@ kore_read_line(FILE *fp, char *in, size_t len) p = in; in[strcspn(in, "\n")] = '\0'; - while (isspace(*p)) + while (isspace(*(unsigned char *)p)) p++; if (p[0] == '#' || p[0] == '\0') {