aboutsummaryrefslogtreecommitdiffstats
path: root/in_cksum.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2001-01-10 23:34:06 +0000
committerGuy Harris <guy@alum.mit.edu>2001-01-10 23:34:06 +0000
commit1305c06917a87dd26c06b551a4abd07f41d0ba64 (patch)
tree9d1e131cdf8531ec9a339298654e95ef18b84c50 /in_cksum.c
parentc1bbd1b2771a84b3b1df6325ba92436f89283663 (diff)
downloadwireshark-1305c06917a87dd26c06b551a4abd07f41d0ba64.tar.gz
wireshark-1305c06917a87dd26c06b551a4abd07f41d0ba64.tar.bz2
wireshark-1305c06917a87dd26c06b551a4abd07f41d0ba64.zip
When testing the low-order bit of a pointer, cast it to "unsigned long",
not to "int", to squelch complaints from GCC on LP64 platforms such as most UNIXes on Alpha. svn path=/trunk/; revision=2865
Diffstat (limited to 'in_cksum.c')
-rw-r--r--in_cksum.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/in_cksum.c b/in_cksum.c
index abd1a8b969..ee047a8c2c 100644
--- a/in_cksum.c
+++ b/in_cksum.c
@@ -2,7 +2,7 @@
* 4.4-Lite-2 Internet checksum routine, modified to take a vector of
* pointers/lengths giving the pieces to be checksummed.
*
- * $Id: in_cksum.c,v 1.2 2000/12/14 17:51:51 gram Exp $
+ * $Id: in_cksum.c,v 1.3 2001/01/10 23:34:06 guy Exp $
*/
/*
@@ -109,7 +109,7 @@ in_cksum(const vec_t *vec, int veclen)
/*
* Force to even boundary.
*/
- if ((1 & (int) w) && (mlen > 0)) {
+ if ((1 & (unsigned long) w) && (mlen > 0)) {
REDUCE;
sum <<= 8;
s_util.c[0] = *(const guint8 *)w;