diff options
author | des <des@FreeBSD.org> | 2007-12-06 09:31:13 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2007-12-06 09:31:13 +0000 |
commit | 90c2422b90a6eff6a3e3e70983a38bf891f4f271 (patch) | |
tree | ab79d4107c088813577b7bce4d0bf5af510d2fc0 | |
parent | 82ec005a0a3eb13a9c5e676c1965696509fa2c62 (diff) | |
download | FreeBSD-src-90c2422b90a6eff6a3e3e70983a38bf891f4f271.zip FreeBSD-src-90c2422b90a6eff6a3e3e70983a38bf891f4f271.tar.gz |
Simpler version of the previous commit.
-rw-r--r-- | sys/netinet/libalias/alias_util.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/netinet/libalias/alias_util.c b/sys/netinet/libalias/alias_util.c index 37068c2..b04b133 100644 --- a/sys/netinet/libalias/alias_util.c +++ b/sys/netinet/libalias/alias_util.c @@ -110,7 +110,6 @@ TcpChecksum(struct ip *pip) struct tcphdr *tc; int nhdr, ntcp, nbytes; int sum, oddbyte; - void *v; nhdr = pip->ip_hl << 2; ntcp = ntohs(pip->ip_len) - nhdr; @@ -132,12 +131,10 @@ TcpChecksum(struct ip *pip) sum += oddbyte; } /* "Pseudo-header" data */ - v = &pip->ip_dst; - ptr = v; + ptr = (void *)&pip->ip_dst; sum += *ptr++; sum += *ptr; - v = &pip->ip_src; - ptr = v; + ptr = (void *)&pip->ip_src; sum += *ptr++; sum += *ptr; sum += htons((u_short) ntcp); |