diff options
author | dfr <dfr@FreeBSD.org> | 2000-09-29 16:53:39 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 2000-09-29 16:53:39 +0000 |
commit | 21cdd88f1cfd53f3b5cf09b2cb580d4a1956b5b9 (patch) | |
tree | f5e631fea7a12cbce90a01192f566060461d52cb /sys/ia64 | |
parent | 84bb619651e7ee2e83a5c38df5fb72e4be2e4a3b (diff) | |
download | FreeBSD-src-21cdd88f1cfd53f3b5cf09b2cb580d4a1956b5b9.zip FreeBSD-src-21cdd88f1cfd53f3b5cf09b2cb580d4a1956b5b9.tar.gz |
Ansify and fix warnings.
Diffstat (limited to 'sys/ia64')
-rw-r--r-- | sys/ia64/ia64/in_cksum.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/sys/ia64/ia64/in_cksum.c b/sys/ia64/ia64/in_cksum.c index 4b7fca2..068134a 100644 --- a/sys/ia64/ia64/in_cksum.c +++ b/sys/ia64/ia64/in_cksum.c @@ -88,14 +88,10 @@ union q_util { u_int64_t q; }; -u_int64_t in_cksumdata __P((caddr_t buf, int len)); - -u_int64_t -in_cksumdata(buf, len) - register caddr_t buf; - register int len; +static u_int64_t +in_cksumdata(const void *buf, size_t len) { - const u_int32_t *lw = (u_int32_t *) buf; + const u_int32_t *lw = (const u_int32_t *) buf; u_int64_t sum = 0; u_int64_t prefilled; int offset; @@ -195,10 +191,7 @@ in_pseudo(u_int32_t a, u_int32_t b, u_int32_t c) } u_short -in_cksum_skip(m, len, skip) - struct mbuf *m; - int len; - int skip; +in_cksum_skip(struct mbuf *m, int len, int skip) { u_int64_t sum = 0; int mlen = 0; @@ -238,10 +231,9 @@ skip_start: return (~sum & 0xffff); } -u_int in_cksum_hdr(ip) - const struct ip *ip; +u_int in_cksum_hdr(const struct ip *ip) { - u_int64_t sum = in_cksumdata((caddr_t) ip, sizeof(struct ip)); + u_int64_t sum = in_cksumdata(ip, sizeof(struct ip)); union q_util q_util; union l_util l_util; REDUCE16; |