summaryrefslogtreecommitdiff
path: root/sds.c
diff options
context:
space:
mode:
Diffstat (limited to 'sds.c')
-rw-r--r--sds.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sds.c b/sds.c
index a20ba19..21ecec0 100644
--- a/sds.c
+++ b/sds.c
@@ -886,7 +886,7 @@ sds sdscatrepr(sds s, const char *p, size_t len) {
case '\a': s = sdscatlen(s,"\\a",2); break;
case '\b': s = sdscatlen(s,"\\b",2); break;
default:
- if (isprint(*p))
+ if (isprint((int) *p))
s = sdscatprintf(s,"%c",*p);
else
s = sdscatprintf(s,"\\x%02x",(unsigned char)*p);
@@ -948,7 +948,7 @@ sds *sdssplitargs(const char *line, int *argc) {
*argc = 0;
while(1) {
/* skip blanks */
- while(*p && isspace(*p)) p++;
+ while(*p && isspace((int) *p)) p++;
if (*p) {
/* get a token */
int inq=0; /* set to 1 if we are in "quotes" */
@@ -959,8 +959,8 @@ sds *sdssplitargs(const char *line, int *argc) {
while(!done) {
if (inq) {
if (*p == '\\' && *(p+1) == 'x' &&
- isxdigit(*(p+2)) &&
- isxdigit(*(p+3)))
+ isxdigit((int) *(p+2)) &&
+ isxdigit((int) *(p+3)))
{
unsigned char byte;
@@ -984,7 +984,7 @@ sds *sdssplitargs(const char *line, int *argc) {
} else if (*p == '"') {
/* closing quote must be followed by a space or
* nothing at all. */
- if (*(p+1) && !isspace(*(p+1))) goto err;
+ if (*(p+1) && !isspace((int) *(p+1))) goto err;
done=1;
} else if (!*p) {
/* unterminated quotes */
@@ -999,7 +999,7 @@ sds *sdssplitargs(const char *line, int *argc) {
} else if (*p == '\'') {
/* closing quote must be followed by a space or
* nothing at all. */
- if (*(p+1) && !isspace(*(p+1))) goto err;
+ if (*(p+1) && !isspace((int) *(p+1))) goto err;
done=1;
} else if (!*p) {
/* unterminated quotes */