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>
This commit is contained in:
parent
e567c582a7
commit
24bce46e9c
1 changed files with 2 additions and 1 deletions
|
@ -3468,7 +3468,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
val = strtol(pos, &endp, 0);
|
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,
|
wpa_printf(MSG_ERROR,
|
||||||
"Line %d: Invalid fst_llt %ld (%s) (expected 1..%u)",
|
"Line %d: Invalid fst_llt %ld (%s) (expected 1..%u)",
|
||||||
line, val, pos, FST_MAX_LLT_MS);
|
line, val, pos, FST_MAX_LLT_MS);
|
||||||
|
|
Loading…
Reference in a new issue