diff options
author | glebius <glebius@FreeBSD.org> | 2005-06-20 08:31:48 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2005-06-20 08:31:48 +0000 |
commit | 5b74333367fede778503245b4c4e0cd64ab0d8a7 (patch) | |
tree | ac19c2ddb9c303e6946be4122b0d560b0f54b0e0 /sys | |
parent | cb0516417f6bc9a7cc4ead84b8d2b6949ace4fad (diff) | |
download | FreeBSD-src-5b74333367fede778503245b4c4e0cd64ab0d8a7.zip FreeBSD-src-5b74333367fede778503245b4c4e0cd64ab0d8a7.tar.gz |
- Don't use legacy function in a non-legacy one. This gives us
possibility to compile libalias without legacy support.
- Use correct way to mark variable as unused.
Approved by: re (dwhite)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/libalias/alias_util.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/netinet/libalias/alias_util.c b/sys/netinet/libalias/alias_util.c index acebc00..4234276 100644 --- a/sys/netinet/libalias/alias_util.c +++ b/sys/netinet/libalias/alias_util.c @@ -71,12 +71,11 @@ purposes); #endif u_short -LibAliasInternetChecksum(struct libalias *la, u_short * ptr, int nbytes) +LibAliasInternetChecksum(struct libalias *la __unused, u_short * ptr, + int nbytes) { int sum, oddbyte; - (void)la; - sum = 0; while (nbytes > 1) { sum += *ptr++; @@ -96,7 +95,7 @@ LibAliasInternetChecksum(struct libalias *la, u_short * ptr, int nbytes) u_short IpChecksum(struct ip *pip) { - return (PacketAliasInternetChecksum((u_short *) pip, + return (LibAliasInternetChecksum(NULL, (u_short *) pip, (pip->ip_hl << 2))); } |