aboutsummaryrefslogtreecommitdiffstats
path: root/src/radius/radius_das.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-07-07 09:14:47 (GMT)
committerJouni Malinen <j@w1.fi>2015-07-07 13:25:06 (GMT)
commit028b19675dcf696e8057aaec66c39f3f4066a48b (patch)
treed4c48bc17561e8be499b8f454617a7d193d75923 /src/radius/radius_das.c
parent597e8afeb465199ed41693a1b59b7d8f53c3286c (diff)
downloadhostap-028b19675dcf696e8057aaec66c39f3f4066a48b.zip
hostap-028b19675dcf696e8057aaec66c39f3f4066a48b.tar.gz
hostap-028b19675dcf696e8057aaec66c39f3f4066a48b.tar.bz2
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>
Diffstat (limited to 'src/radius/radius_das.c')
-rw-r--r--src/radius/radius_das.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/radius/radius_das.c b/src/radius/radius_das.c
index 39ceea8..b7d991b 100644
--- a/src/radius/radius_das.c
+++ b/src/radius/radius_das.c
@@ -245,7 +245,7 @@ static void radius_das_receive(int sock, void *eloop_ctx, void *sock_ctx)
(u8 *) &val, 4);
if (res == 4) {
u32 timestamp = ntohl(val);
- if ((unsigned int) abs(now.sec - timestamp) >
+ if ((unsigned int) abs((int) (now.sec - timestamp)) >
das->time_window) {
wpa_printf(MSG_DEBUG, "DAS: Unacceptable "
"Event-Timestamp (%u; local time %u) in "