summaryrefslogtreecommitdiff
path: root/lib/libalpm/util.c
diff options
context:
space:
mode:
authorXavier Chantry <shiningxc@gmail.com>2009-09-26 00:58:42 +0200
committerDan McGee <dan@archlinux.org>2009-10-11 15:12:20 -0500
commitcaea098c2191a2d94a28e90bfef958c34473a5a4 (patch)
treef27ec0455b22930ae74ee6eb4386eef6e2d9a447 /lib/libalpm/util.c
parent35bbc96b99a8f9c8534b20d0ff7a30526b7d957d (diff)
downloadpacman-caea098c2191a2d94a28e90bfef958c34473a5a4.tar.xz
cygwin fix : use unsigned char for ctype function
See http://www.nabble.com/-PATCH-RFA--Distinguish-between-EOF-and-character-with-value-0xff-td23161772.html#a23188494 cygwin 1.7 actually displays a warning when using signed char with the ctype function, so that compilation fails when using -Wall -Werror. So we just cast all arguments to unsigned char. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/util.c')
-rw-r--r--lib/libalpm/util.c4
1 files changed, 2 insertions, 2 deletions
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';