From cb83dab4adfb2b64dd75d3c98755bc2c6943980b Mon Sep 17 00:00:00 2001 From: Baptiste Daroussin Date: Wed, 2 Dec 2015 14:59:51 +0100 Subject: [PATCH] More casting for ctype --- libpkgconf/dependency.c | 6 +++--- main.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libpkgconf/dependency.c b/libpkgconf/dependency.c index dffb3c4..cc20afd 100644 --- a/libpkgconf/dependency.c +++ b/libpkgconf/dependency.c @@ -108,11 +108,11 @@ pkgconf_dependency_parse_str(pkgconf_list_t *deplist_head, const char *depends) break; case INSIDE_MODULE_NAME: - if (isspace(*ptr)) + if (isspace((unsigned int)*ptr)) { const char *sptr = ptr; - while (*sptr && isspace(*sptr)) + while (*sptr && isspace((unsigned int)*sptr)) sptr++; if (*sptr == '\0') @@ -176,7 +176,7 @@ pkgconf_dependency_parse_str(pkgconf_list_t *deplist_head, const char *depends) break; case AFTER_OPERATOR: - if (!isspace(*ptr)) + if (!isspace((unsigned int)*ptr)) { vstart = ptr; state = INSIDE_VERSION; diff --git a/main.c b/main.c index da51a19..36d794c 100644 --- a/main.c +++ b/main.c @@ -848,7 +848,7 @@ main(int argc, char *argv[]) if (package == NULL) break; - while (isspace(package[0])) + while (isspace((unsigned int)package[0])) package++; /* skip empty packages */