diff --git a/sys/amd64/amd64/in_cksum.c b/sys/amd64/amd64/in_cksum.c index 4b7fca2055ee..068134aa59ad 100644 --- a/sys/amd64/amd64/in_cksum.c +++ b/sys/amd64/amd64/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 @@ in_cksum_skip(m, len, skip) 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; diff --git a/sys/ia64/ia64/in_cksum.c b/sys/ia64/ia64/in_cksum.c index 4b7fca2055ee..068134aa59ad 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 @@ in_cksum_skip(m, len, skip) 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;