diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-06-13 10:34:46 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-06-13 10:34:46 +0000 |
commit | 2749384c8aaa69fbc36ce543a91a2bd725cf0fa7 (patch) | |
tree | 6fd6594872e335e5231a4f2ac6784566e5d84200 /src/fs/fs_uri.c | |
parent | f3ea350b538c3c8584bb5f37b038eb6e5fc3ff16 (diff) | |
download | gnunet-2749384c8aaa69fbc36ce543a91a2bd725cf0fa7.tar.gz gnunet-2749384c8aaa69fbc36ce543a91a2bd725cf0fa7.zip |
pass only unsigned char to isspace and the like
Diffstat (limited to 'src/fs/fs_uri.c')
-rw-r--r-- | src/fs/fs_uri.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c index 5ddb48f2a..95a161370 100644 --- a/src/fs/fs_uri.c +++ b/src/fs/fs_uri.c | |||
@@ -927,7 +927,7 @@ canonicalize_keyword (const char *in) | |||
927 | rpos = in; | 927 | rpos = in; |
928 | while ('\0' != *rpos) | 928 | while ('\0' != *rpos) |
929 | { | 929 | { |
930 | switch (tolower(*rpos)) | 930 | switch (tolower( (unsigned char) *rpos)) |
931 | { | 931 | { |
932 | case 'a': | 932 | case 'a': |
933 | case 'e': | 933 | case 'e': |
@@ -962,7 +962,7 @@ canonicalize_keyword (const char *in) | |||
962 | case 'y': | 962 | case 'y': |
963 | case 'z': | 963 | case 'z': |
964 | /* convert characters listed above to lower case */ | 964 | /* convert characters listed above to lower case */ |
965 | *wpos = tolower(*rpos); | 965 | *wpos = tolower( (unsigned char)*rpos); |
966 | wpos++; | 966 | wpos++; |
967 | case '!': | 967 | case '!': |
968 | case '.': | 968 | case '.': |
@@ -1149,7 +1149,7 @@ GNUNET_FS_uri_ksk_create (const char *keywords, | |||
1149 | pos = searchString; | 1149 | pos = searchString; |
1150 | while ('\0' != *pos) | 1150 | while ('\0' != *pos) |
1151 | { | 1151 | { |
1152 | if ((saw_quote == 0) && (isspace (*pos))) | 1152 | if ((saw_quote == 0) && (isspace ((unsigned char) *pos))) |
1153 | { | 1153 | { |
1154 | inWord = 0; | 1154 | inWord = 0; |
1155 | } | 1155 | } |
@@ -1180,7 +1180,7 @@ GNUNET_FS_uri_ksk_create (const char *keywords, | |||
1180 | pos = searchString; | 1180 | pos = searchString; |
1181 | while ('\0' != *pos) | 1181 | while ('\0' != *pos) |
1182 | { | 1182 | { |
1183 | if ((saw_quote == 0) && (isspace (*pos))) | 1183 | if ((saw_quote == 0) && (isspace ( (unsigned char) *pos))) |
1184 | { | 1184 | { |
1185 | inWord = 0; | 1185 | inWord = 0; |
1186 | *pos = '\0'; | 1186 | *pos = '\0'; |
@@ -1573,7 +1573,7 @@ GNUNET_FS_uri_ksk_create_from_meta_data (const struct GNUNET_CONTAINER_MetaData | |||
1573 | static int | 1573 | static int |
1574 | needs_percent (char c) | 1574 | needs_percent (char c) |
1575 | { | 1575 | { |
1576 | return (!((isalnum (c)) || | 1576 | return (!((isalnum ( (unsigned char) c)) || |
1577 | (c == '-') || (c == '_') || (c == '.') || (c == '~'))); | 1577 | (c == '-') || (c == '_') || (c == '.') || (c == '~'))); |
1578 | } | 1578 | } |
1579 | 1579 | ||