]> The Tcpdump Group git mirrors - tcpdump/blobdiff - in_cksum.c
Use uintptr_t to look at the bits of a pointer.
[tcpdump] / in_cksum.c
index 8ceaf104446eda7fb49b41c52518c96a8f982f93..e9bed2287ae626f9e263e09c51170a6738f7fea7 100644 (file)
@@ -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;