diff options
Diffstat (limited to 'lib/libalpm')
-rw-r--r-- | lib/libalpm/be_files.c | 4 | ||||
-rw-r--r-- | lib/libalpm/be_package.c | 2 | ||||
-rw-r--r-- | lib/libalpm/util.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/libalpm/be_files.c b/lib/libalpm/be_files.c index 21533ef2..51492d52 100644 --- a/lib/libalpm/be_files.c +++ b/lib/libalpm/be_files.c @@ -495,7 +495,7 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq) } _alpm_strtrim(line); - char first = tolower(line[0]); + char first = tolower((unsigned char)line[0]); if(first > 'a' && first < 'z') { struct tm tmp_tm = {0}; /* initialize to null in case of failure */ setlocale(LC_TIME, "C"); @@ -511,7 +511,7 @@ int _alpm_db_read(pmdb_t *db, pmpkg_t *info, pmdbinfrq_t inforeq) } _alpm_strtrim(line); - char first = tolower(line[0]); + char first = tolower((unsigned char)line[0]); if(first > 'a' && first < 'z') { struct tm tmp_tm = {0}; /* initialize to null in case of failure */ setlocale(LC_TIME, "C"); diff --git a/lib/libalpm/be_package.c b/lib/libalpm/be_package.c index 1cd30c28..c1a43438 100644 --- a/lib/libalpm/be_package.c +++ b/lib/libalpm/be_package.c @@ -82,7 +82,7 @@ static int parse_descfile(struct archive *a, pmpkg_t *newpkg) } else if(!strcmp(key, "license")) { newpkg->licenses = alpm_list_add(newpkg->licenses, strdup(ptr)); } else if(!strcmp(key, "builddate")) { - char first = tolower(ptr[0]); + char first = tolower((unsigned char)ptr[0]); if(first > 'a' && first < 'z') { struct tm tmp_tm = {0}; /* initialize to null in case of failure */ setlocale(LC_TIME, "C"); diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c index c5485925..c44da4f3 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c @@ -175,7 +175,7 @@ char *_alpm_strtrim(char *str) return(str); } - while(isspace((int)*pch)) { + while(isspace((unsigned char)*pch)) { pch++; } if(pch != str) { @@ -188,7 +188,7 @@ char *_alpm_strtrim(char *str) } pch = (str + (strlen(str) - 1)); - while(isspace((int)*pch)) { + while(isspace((unsigned char)*pch)) { pch--; } *++pch = '\0'; |