summaryrefslogtreecommitdiff
path: root/usr.sbin/rtadvd
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2012-09-05 05:52:11 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2012-09-05 05:52:11 +0000
commit3a11b2ea55fa6dc153a774fd31dbba2d338fba17 (patch)
treec9996d1048aaf8db75b6a96b0e70ef117ee25d25 /usr.sbin/rtadvd
parent4d22d0e776e95e62b7629be713ef4c4b775f73df (diff)
don't truncate a pointer to int, before checking the low bits -- use uintptr_t
from UMEZAWA Takeshi
Diffstat (limited to 'usr.sbin/rtadvd')
-rw-r--r--usr.sbin/rtadvd/config.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/rtadvd/config.c b/usr.sbin/rtadvd/config.c
index 53719ec37df..0424d946cee 100644
--- a/usr.sbin/rtadvd/config.c
+++ b/usr.sbin/rtadvd/config.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: config.c,v 1.29 2012/07/09 08:55:19 phessler Exp $ */
+/* $OpenBSD: config.c,v 1.30 2012/09/05 05:52:10 deraadt Exp $ */
/* $KAME: config.c,v 1.62 2002/05/29 10:13:10 itojun Exp $ */
/*
@@ -55,6 +55,7 @@
#include <search.h>
#include <unistd.h>
#include <ifaddrs.h>
+#include <stdint.h>
#include "rtadvd.h"
#include "advcap.h"
@@ -880,7 +881,7 @@ make_packet(struct rainfo *rainfo)
}
/* zero out the end of the current option */
- while ((int)buf % 8 != 0)
+ while (((uintptr_t)buf) % 8 != 0)
*buf++ = '\0';
}