From: Jouni Malinen Date: Tue, 7 Jul 2015 09:14:47 +0000 (+0300) Subject: RADIUS DAS: Avoid compiler warning on abs() X-Git-Tag: hostap_2_5~470 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=028b19675dcf696e8057aaec66c39f3f4066a48b;p=thirdparty%2Fhostap.git 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 --- diff --git a/src/radius/radius_das.c b/src/radius/radius_das.c index 39ceea879..b7d991bbd 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 "