unsigned char casts for isspace()
diff --git a/got/got.c b/got/got.c
index 881055b..0261d5d 100644
--- a/got/got.c
+++ b/got/got.c
@@ -3263,7 +3263,7 @@ show_rebase_progress(struct got_commit_object *commit,
}
logmsg = logmsg0;
- while (isspace(logmsg[0]))
+ while (isspace((unsigned char)logmsg[0]))
logmsg++;
old_id_str[12] = '\0';
diff --git a/lib/object_create.c b/lib/object_create.c
index eb00564..feb2dca 100644
--- a/lib/object_create.c
+++ b/lib/object_create.c
@@ -332,10 +332,10 @@ got_object_commit_create(struct got_object_id **id,
return got_error_from_errno("strdup");
msg = msg0;
- while (isspace(msg[0]))
+ while (isspace((unsigned char)msg[0]))
msg++;
len = strlen(msg);
- while (len > 0 && isspace(msg[len - 1])) {
+ while (len > 0 && isspace((unsigned char)msg[len - 1])) {
msg[len - 1] = '\0';
len--;
}