diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-12-15 11:22:19 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-12-15 11:22:19 -0800 |
commit | fd2a4d9ad21d2899af182e383a2d2c70ba8832f6 (patch) | |
tree | d1b00dc699b247708428037ff141e260e7b596b4 /in_cksum.c | |
parent | f25ed1f812ec8eddf9702d54f16e5aa15c371271 (diff) | |
download | tcpdump-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |