Ansify and fix warnings.

This commit is contained in:
Doug Rabson 2000-09-29 16:53:39 +00:00
parent 254d92cca6
commit 8fb26af111
2 changed files with 12 additions and 28 deletions

View File

@ -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;

View File

@ -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;