Khorben/warnings (#519)

* Fix warnings and missing #include for <ctype.h>
* Avoid a warning in client/util.c
This commit is contained in:
Pierre Pronchery 2017-12-28 17:56:18 +01:00 committed by pwpiwi
commit 3ded0f97d3
8 changed files with 14 additions and 12 deletions

View file

@ -40,14 +40,14 @@ int split(char *str, char *arr[MAX_ARGS]){
int wordCnt = 0;
while(1){
while(isspace(str[beginIndex])){
while(isspace((unsigned char)str[beginIndex])){
++beginIndex;
}
if(str[beginIndex] == '\0') {
break;
}
endIndex = beginIndex;
while (str[endIndex] && !isspace(str[endIndex])){
while (str[endIndex] && !isspace((unsigned char)str[endIndex])){
++endIndex;
}
int len = endIndex - beginIndex;