aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2016-02-10 19:27:42 (GMT)
committerJouni Malinen <j@w1.fi>2016-02-18 15:39:00 (GMT)
commit640b0b933a8fea3f2276198c42c8fd60dd39aaa3 (patch)
treeadadd6126dd90c343c76e99a0081310d8fa98162 /src
parenta5a3efccc2bf91444d048ebe6d95116fc3c3abdd (diff)
downloadhostap-640b0b933a8fea3f2276198c42c8fd60dd39aaa3.zip
hostap-640b0b933a8fea3f2276198c42c8fd60dd39aaa3.tar.gz
hostap-640b0b933a8fea3f2276198c42c8fd60dd39aaa3.tar.bz2
ctype functions require an unsigned char
Ensure that characters are represented as unsigned char when using isblank() and isspace(). These function take in a "int c" argument, but it needs to be unsigned for the cases where EOF is not indicated. Signed-off-by: Roy Marples <roy@marples.name>
Diffstat (limited to 'src')
-rw-r--r--src/drivers/driver_common.c4
-rw-r--r--src/utils/common.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/drivers/driver_common.c b/src/drivers/driver_common.c
index aebea8c..b32d35f 100644
--- a/src/drivers/driver_common.c
+++ b/src/drivers/driver_common.c
@@ -183,12 +183,12 @@ wpa_get_wowlan_triggers(const char *wowlan_triggers,
start = buf;
while (*start != '\0') {
- while (isblank(*start))
+ while (isblank((unsigned char) *start))
start++;
if (*start == '\0')
break;
end = start;
- while (!isblank(*end) && *end != '\0')
+ while (!isblank((unsigned char) *end) && *end != '\0')
end++;
last = *end == '\0';
*end = '\0';
diff --git a/src/utils/common.c b/src/utils/common.c
index e74a2ae..9c7d0d4 100644
--- a/src/utils/common.c
+++ b/src/utils/common.c
@@ -86,7 +86,7 @@ int hwaddr_masked_aton(const char *txt, u8 *addr, u8 *mask, u8 maskable)
return -1;
/* check for optional mask */
- if (*r == '\0' || isspace(*r)) {
+ if (*r == '\0' || isspace((unsigned char) *r)) {
/* no mask specified, assume default */
os_memset(mask, 0xff, ETH_ALEN);
} else if (maskable && *r == '/') {