summaryrefslogtreecommitdiff
path: root/in_cksum.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-12-15 11:22:19 -0800
committerGuy Harris <guy@alum.mit.edu>2015-12-15 11:22:19 -0800
commitfd2a4d9ad21d2899af182e383a2d2c70ba8832f6 (patch)
treed1b00dc699b247708428037ff141e260e7b596b4 /in_cksum.c
parentf25ed1f812ec8eddf9702d54f16e5aa15c371271 (diff)
downloadtcpdump-fd2a4d9ad21d2899af182e383a2d2c70ba8832f6.tar.gz
Use uintptr_t to look at the bits of a pointer.
We use AC_TYPE_UINTPTR_T in the configure script, so it'll be defined if we use autotools, and MSVC has supported it since at least Visual Studio .NET 2003, so we'll use it instead of "unsigned long"; "unsigned long" causes warnings on LLP64 platforms, as it's not wide enough for a pointer on those platforms.
Diffstat (limited to 'in_cksum.c')
-rw-r--r--in_cksum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/in_cksum.c b/in_cksum.c
index 8ceaf104..e9bed228 100644
--- a/in_cksum.c
+++ b/in_cksum.c
@@ -92,7 +92,7 @@ in_cksum(const struct cksum_vec *vec, int veclen)
/*
* Force to even boundary.
*/
- if ((1 & (unsigned long) w) && (mlen > 0)) {
+ if ((1 & (uintptr_t) w) && (mlen > 0)) {
REDUCE;
sum <<= 8;
s_util.c[0] = *(const uint8_t *)w;