aboutsummaryrefslogtreecommitdiffstats
path: root/src/radius/radius_das.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2013-11-05 22:00:58 (GMT)
committerJouni Malinen <j@w1.fi>2013-11-05 22:00:58 (GMT)
commit1281c0ab692592a02282e040271ae17a05488062 (patch)
tree734a3de45c3de18d0b3e62c0f43fde6ccbbe8a06 /src/radius/radius_das.c
parent2b6623ab134fff6d96114f5fe329a2f87d5e893a (diff)
downloadhostap-1281c0ab692592a02282e040271ae17a05488062.zip
hostap-1281c0ab692592a02282e040271ae17a05488062.tar.gz
hostap-1281c0ab692592a02282e040271ae17a05488062.tar.bz2
Remove a compiler warning from -O0 build
It looks like abs() result is signed and gcc warns about this when running a build with -O0 but not with -O2. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/radius/radius_das.c')
-rw-r--r--src/radius/radius_das.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/radius/radius_das.c b/src/radius/radius_das.c
index 8e5988d..418b160 100644
--- a/src/radius/radius_das.c
+++ b/src/radius/radius_das.c
@@ -200,7 +200,8 @@ static void radius_das_receive(int sock, void *eloop_ctx, void *sock_ctx)
(u8 *) &val, 4);
if (res == 4) {
u32 timestamp = ntohl(val);
- if (abs(now.sec - timestamp) > das->time_window) {
+ if ((unsigned int) abs(now.sec - timestamp) >
+ das->time_window) {
wpa_printf(MSG_DEBUG, "DAS: Unacceptable "
"Event-Timestamp (%u; local time %u) in "
"packet from %s:%d - drop",