aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/libalias/alias_util.c
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2007-12-06 09:31:13 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2007-12-06 09:31:13 +0000
commit6c7faee24ffbe4acca76e485e64152d54889b1ad (patch)
treeab79d4107c088813577b7bce4d0bf5af510d2fc0 /sys/netinet/libalias/alias_util.c
parentf97a705a999c1468b7280ef79ea8856ee61a7bb3 (diff)
downloadsrc-6c7faee24ffbe4acca76e485e64152d54889b1ad.tar.gz
src-6c7faee24ffbe4acca76e485e64152d54889b1ad.zip
Simpler version of the previous commit.
Notes
Notes: svn path=/head/; revision=174348
Diffstat (limited to 'sys/netinet/libalias/alias_util.c')
-rw-r--r--sys/netinet/libalias/alias_util.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/netinet/libalias/alias_util.c b/sys/netinet/libalias/alias_util.c
index 37068c208cbe..b04b1335a979 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);