aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/config_file.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2016-03-20 19:37:12 (GMT)
committerJouni Malinen <j@w1.fi>2016-03-20 19:38:45 (GMT)
commit24bce46e9c86c77fcb5b22a55c4ed7843d92f48d (patch)
treed55c5c9bf57d886515abb0b6f9c6e9244c5c22ed /hostapd/config_file.c
parente567c582a7ab7d9a9160d546550a15576409cad6 (diff)
downloadhostap-24bce46e9c86c77fcb5b22a55c4ed7843d92f48d.zip
hostap-24bce46e9c86c77fcb5b22a55c4ed7843d92f48d.tar.gz
hostap-24bce46e9c86c77fcb5b22a55c4ed7843d92f48d.tar.bz2
FST: Fix a compiler warning
FST_MAX_PRIO_VALUE is unsigned (u32) and some gcc versions warning about comparisong to long int val at least on 32-bit builds. Get rid of this warning by type casesing val to unsigned long int after having verified that it is positive. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'hostapd/config_file.c')
-rw-r--r--hostapd/config_file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 6f525d9..c35d5ae 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -3468,7 +3468,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
return -1;
}
val = strtol(pos, &endp, 0);
- if (*endp || val < 1 || val > FST_MAX_LLT_MS) {
+ if (*endp || val < 1 ||
+ (unsigned long int) val > FST_MAX_LLT_MS) {
wpa_printf(MSG_ERROR,
"Line %d: Invalid fst_llt %ld (%s) (expected 1..%u)",
line, val, pos, FST_MAX_LLT_MS);