RADIUS DAS: Avoid compiler warning on abs()
The input parameter ended up being converted to long int instead of int, so use an explicit typecase to get rid of the compiler warning. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
597e8afeb4
commit
028b19675d
1 changed files with 1 additions and 1 deletions
|
@ -245,7 +245,7 @@ static void radius_das_receive(int sock, void *eloop_ctx, void *sock_ctx)
|
||||||
(u8 *) &val, 4);
|
(u8 *) &val, 4);
|
||||||
if (res == 4) {
|
if (res == 4) {
|
||||||
u32 timestamp = ntohl(val);
|
u32 timestamp = ntohl(val);
|
||||||
if ((unsigned int) abs(now.sec - timestamp) >
|
if ((unsigned int) abs((int) (now.sec - timestamp)) >
|
||||||
das->time_window) {
|
das->time_window) {
|
||||||
wpa_printf(MSG_DEBUG, "DAS: Unacceptable "
|
wpa_printf(MSG_DEBUG, "DAS: Unacceptable "
|
||||||
"Event-Timestamp (%u; local time %u) in "
|
"Event-Timestamp (%u; local time %u) in "
|
||||||
|
|
Loading…
Reference in a new issue