cast pointers to longs
This commit is contained in:
parent
07231e5b52
commit
4316c36ca7
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: in_cksum.c,v 1.2 1994/10/26 05:44:48 cgd Exp $ */
|
||||
/* $NetBSD: in_cksum.c,v 1.3 1995/04/22 13:53:48 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992 Regents of the University of California.
|
||||
|
@ -61,7 +61,7 @@ in_cksum(p, len)
|
|||
sum += v + *cp++;
|
||||
len--;
|
||||
}
|
||||
if (((int)cp & 1) == 0) {
|
||||
if (((long)cp & 1) == 0) {
|
||||
while ((len -= 2) >= 0) {
|
||||
sum += *(u_short *)cp;
|
||||
cp += 2;
|
||||
|
|
Loading…
Reference in New Issue