fixed sized types, where appropriate. when casting pointers to

integers to do math on them, cast to long.  ioctl commands are
u_longs.
This commit is contained in:
cgd 1995-03-08 02:56:49 +00:00
parent 4e7630d68f
commit e363664703
13 changed files with 109 additions and 109 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if.h,v 1.13 1994/10/30 21:48:48 cgd Exp $ */
/* $NetBSD: if.h,v 1.14 1995/03/08 02:56:49 cgd Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@ -327,7 +327,7 @@ void if_down __P((struct ifnet *));
void if_qflush __P((struct ifqueue *));
void if_slowtimo __P((void *));
void if_up __P((struct ifnet *));
int ifconf __P((int, caddr_t));
int ifconf __P((u_long, caddr_t));
void ifinit __P((void));
int ifioctl __P((struct socket *, u_long, caddr_t, struct proc *));
int ifpromisc __P((struct ifnet *, int));

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_arp.h,v 1.7 1994/06/29 06:36:07 cgd Exp $ */
/* $NetBSD: if_arp.h,v 1.8 1995/03/08 02:56:52 cgd Exp $ */
/*
* Copyright (c) 1986, 1993
@ -46,13 +46,13 @@
* specified. Field names used correspond to RFC 826.
*/
struct arphdr {
u_short ar_hrd; /* format of hardware address */
u_int16_t ar_hrd; /* format of hardware address */
#define ARPHRD_ETHER 1 /* ethernet hardware format */
#define ARPHRD_FRELAY 15 /* frame relay hardware format */
u_short ar_pro; /* format of protocol address */
u_char ar_hln; /* length of hardware address */
u_char ar_pln; /* length of protocol address */
u_short ar_op; /* one of: */
u_int16_t ar_pro; /* format of protocol address */
u_int8_t ar_hln; /* length of hardware address */
u_int8_t ar_pln; /* length of protocol address */
u_int16_t ar_op; /* one of: */
#define ARPOP_REQUEST 1 /* request to resolve address */
#define ARPOP_REPLY 2 /* response to previous request */
#define ARPOP_REVREQUEST 3 /* request protocol address given hardware */
@ -64,10 +64,10 @@ struct arphdr {
* according to the sizes above.
*/
#ifdef COMMENT_ONLY
u_char ar_sha[]; /* sender hardware address */
u_char ar_spa[]; /* sender protocol address */
u_char ar_tha[]; /* target hardware address */
u_char ar_tpa[]; /* target protocol address */
u_int8_t ar_sha[]; /* sender hardware address */
u_int8_t ar_spa[]; /* sender protocol address */
u_int8_t ar_tha[]; /* target hardware address */
u_int8_t ar_tpa[]; /* target protocol address */
#endif
};

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_dl.h,v 1.5 1994/06/29 06:36:10 cgd Exp $ */
/* $NetBSD: if_dl.h,v 1.6 1995/03/08 02:56:53 cgd Exp $ */
/*
* Copyright (c) 1990, 1993
@ -57,14 +57,14 @@
* Structure of a Link-Level sockaddr:
*/
struct sockaddr_dl {
u_char sdl_len; /* Total length of sockaddr */
u_char sdl_family; /* AF_DLI */
u_short sdl_index; /* if != 0, system given index for interface */
u_char sdl_type; /* interface type */
u_char sdl_nlen; /* interface name length, no trailing 0 reqd. */
u_char sdl_alen; /* link level address length */
u_char sdl_slen; /* link layer selector length */
char sdl_data[12]; /* minimum work area, can be larger;
u_int8_t sdl_len; /* Total length of sockaddr */
u_int8_t sdl_family; /* AF_DLI */
u_int16_t sdl_index; /* if != 0, system given index for interface */
u_int8_t sdl_type; /* interface type */
u_int8_t sdl_nlen; /* interface name length, no trailing 0 reqd. */
u_int8_t sdl_alen; /* link level address length */
u_int8_t sdl_slen; /* link layer selector length */
int8_t sdl_data[12]; /* minimum work area, can be larger;
contains both if name and ll address */
};

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ethersubr.c,v 1.9 1994/06/29 06:36:11 cgd Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.10 1995/03/08 02:56:55 cgd Exp $ */
/*
* Copyright (c) 1982, 1989, 1993
@ -100,7 +100,7 @@ ether_output(ifp, m0, dst, rt0)
struct sockaddr *dst;
struct rtentry *rt0;
{
u_short etype;
u_int16_t etype;
int s, error = 0;
u_char edst[6];
register struct mbuf *m = m0;
@ -312,7 +312,7 @@ ether_input(ifp, eh, m)
{
register struct ifqueue *inq;
register struct llc *l;
u_short etype;
u_int16_t etype;
struct arpcom *ac = (struct arpcom *)ifp;
int s;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_llc.h,v 1.5 1994/06/29 06:36:13 cgd Exp $ */
/* $NetBSD: if_llc.h,v 1.6 1995/03/08 02:56:57 cgd Exp $ */
/*
* Copyright (c) 1988, 1993
@ -44,41 +44,41 @@
*/
struct llc {
u_char llc_dsap;
u_char llc_ssap;
u_int8_t llc_dsap;
u_int8_t llc_ssap;
union {
struct {
u_char control;
u_char format_id;
u_char class;
u_char window_x2;
u_int8_t control;
u_int8_t format_id;
u_int8_t class;
u_int8_t window_x2;
} type_u;
struct {
u_char num_snd_x2;
u_char num_rcv_x2;
u_int8_t num_snd_x2;
u_int8_t num_rcv_x2;
} type_i;
struct {
u_char control;
u_char num_rcv_x2;
u_int8_t control;
u_int8_t num_rcv_x2;
} type_s;
struct {
u_char control;
u_int8_t control;
struct frmrinfo {
u_char rej_pdu_0;
u_char rej_pdu_1;
u_char frmr_control;
u_char frmr_control_ext;
u_char frmr_cause;
u_int8_t rej_pdu_0;
u_int8_t rej_pdu_1;
u_int8_t frmr_control;
u_int8_t frmr_control_ext;
u_int8_t frmr_cause;
} frmrinfo;
} type_frmr;
struct {
u_char control;
u_char org_code[3];
u_short ether_type;
u_int8_t control;
u_int8_t org_code[3];
u_int16_t ether_type;
} type_snap;
struct {
u_char control;
u_char control_ext;
u_int8_t control;
u_int8_t control_ext;
} type_raw;
} llc_un;
};

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ppp.c,v 1.20 1994/10/30 21:48:52 cgd Exp $ */
/* $NetBSD: if_ppp.c,v 1.21 1995/03/08 02:56:58 cgd Exp $ */
/*
* if_ppp.c - Point-to-Point Protocol (PPP) Asynchronous driver.
@ -143,7 +143,7 @@ int pppioctl __P((struct ifnet *ifp, u_long cmd, caddr_t data));
void pppstart __P((struct tty *tp));
static int pppasyncstart __P((struct ppp_softc *));
static u_short pppfcs __P((u_short fcs, u_char *cp, int len));
static u_int16_t pppfcs __P((u_int fcs, u_char *cp, int len));
static int pppgetm __P((struct ppp_softc *sc));
static void pppdumpm __P((struct mbuf *m0, int pktlen));
static void pppdumpb __P((u_char *b, int l));
@ -166,7 +166,7 @@ static void ppplogchar __P((struct ppp_softc *, int));
* priority queue. To decide if traffic is interactive, we check that
* a) it is TCP and b) one of its ports is telnet, rlogin or ftp control.
*/
static u_short interactive_ports[8] = {
static u_int16_t interactive_ports[8] = {
0, 513, 0, 0,
0, 21, 0, 23,
};
@ -487,21 +487,21 @@ ppptioctl(tp, cmd, data, flag, p)
case PPPIOCSASYNCMAP:
if (error = suser(p->p_ucred, &p->p_acflag))
return (error);
sc->sc_asyncmap[0] = *(u_int *)data;
sc->sc_asyncmap[0] = *(u_int32_t *)data;
break;
case PPPIOCGASYNCMAP:
*(u_int *)data = sc->sc_asyncmap[0];
*(u_int32_t *)data = sc->sc_asyncmap[0];
break;
case PPPIOCSRASYNCMAP:
if (error = suser(p->p_ucred, &p->p_acflag))
return (error);
sc->sc_rasyncmap = *(u_int *)data;
sc->sc_rasyncmap = *(u_int32_t *)data;
break;
case PPPIOCGRASYNCMAP:
*(u_int *)data = sc->sc_rasyncmap;
*(u_int32_t *)data = sc->sc_rasyncmap;
break;
case PPPIOCSXASYNCMAP:
@ -554,7 +554,7 @@ ppptioctl(tp, cmd, data, flag, p)
/*
* FCS lookup table as calculated by genfcstab.
*/
static u_short fcstab[256] = {
static u_int16_t fcstab[256] = {
0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf,
0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7,
0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e,
@ -592,9 +592,9 @@ static u_short fcstab[256] = {
/*
* Calculate a new FCS given the current FCS and the new data.
*/
static u_short
static u_int16_t
pppfcs(fcs, cp, len)
register u_short fcs;
register u_int fcs;
register u_char *cp;
register int len;
{
@ -648,7 +648,7 @@ pppoutput(ifp, m0, dst, rtp)
* put the packet on the fastq instead.
*/
if ((ip = mtod(m0, struct ip *))->ip_p == IPPROTO_TCP) {
register int p = ntohl(((int *)ip)[ip->ip_hl]);
register int32_t p = ntohl(((int32_t *)ip)[ip->ip_hl]);
if (INTERACTIVE(p & 0xffff) || INTERACTIVE(p >> 16))
ifq = &sc->sc_fastq;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ppp.h,v 1.7 1994/06/29 06:36:19 cgd Exp $ */
/* $NetBSD: if_ppp.h,v 1.8 1995/03/08 02:57:02 cgd Exp $ */
/*
* if_ppp.h - Point-to-Point Protocol definitions.
@ -26,9 +26,9 @@
* Standard PPP header.
*/
struct ppp_header {
u_char ph_address; /* Address Field */
u_char ph_control; /* Control Field */
u_short ph_protocol; /* Protocol Field */
u_int8_t ph_address; /* Address Field */
u_int8_t ph_control; /* Control Field */
u_int16_t ph_protocol; /* Protocol Field */
};
#define PPP_HDRLEN 4 /* sizeof(struct ppp_header) must be 4 */
@ -66,7 +66,7 @@ struct ppp_header {
#define PPP_MAXMRU 65000 /* Largest MRU we allow */
/* Extended asyncmap - allows any character to be escaped. */
typedef u_long ext_accm[8];
typedef u_int32_t ext_accm[8];
/*
* Structure describing each ppp unit.
@ -89,7 +89,7 @@ struct ppp_softc {
/* Device-dependent part for async lines. */
ext_accm sc_asyncmap; /* async control character map */
u_long sc_rasyncmap; /* receive async control char map */
u_int32_t sc_rasyncmap; /* receive async control char map */
struct mbuf *sc_outm; /* mbuf chain being output currently */
struct mbuf *sc_m; /* pointer to input mbuf chain */
struct mbuf *sc_mc; /* pointer to current input mbuf */
@ -127,11 +127,11 @@ struct ppp_softc {
/* this stuff doesn't belong here... */
#define PPPIOCGFLAGS _IOR('t', 90, int) /* get configuration flags */
#define PPPIOCSFLAGS _IOW('t', 89, int) /* set configuration flags */
#define PPPIOCGASYNCMAP _IOR('t', 88, int) /* get async map */
#define PPPIOCSASYNCMAP _IOW('t', 87, int) /* set async map */
#define PPPIOCGASYNCMAP _IOR('t', 88, int32_t) /* get async map */
#define PPPIOCSASYNCMAP _IOW('t', 87, int32_t) /* set async map */
#define PPPIOCGUNIT _IOR('t', 86, int) /* get ppp unit number */
#define PPPIOCGRASYNCMAP _IOR('t', 85, int) /* get receive async map */
#define PPPIOCSRASYNCMAP _IOW('t', 84, int) /* set receive async map */
#define PPPIOCGRASYNCMAP _IOR('t', 85, int32_t) /* get receive async map */
#define PPPIOCSRASYNCMAP _IOW('t', 84, int32_t) /* set receive async map */
#define PPPIOCGMRU _IOR('t', 83, int) /* get max receive unit */
#define PPPIOCSMRU _IOW('t', 82, int) /* set max receive unit */
#define PPPIOCSMAXCID _IOW('t', 81, int) /* set VJ max slot ID */

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_sl.c,v 1.33 1994/12/11 21:39:05 mycroft Exp $ */
/* $NetBSD: if_sl.c,v 1.34 1995/03/08 02:57:05 cgd Exp $ */
/*
* Copyright (c) 1987, 1989, 1992, 1993
@ -671,7 +671,7 @@ sl_btom(sc, len)
}
sc->sc_ep = mtod(m, u_char *) + SLBUFSIZE;
m->m_data = (caddr_t)sc->sc_buf;
m->m_ext.ext_buf = (caddr_t)((int)sc->sc_buf &~ MCLOFSET);
m->m_ext.ext_buf = (caddr_t)((long)sc->sc_buf &~ MCLOFSET);
} else
bcopy((caddr_t)sc->sc_buf, mtod(m, caddr_t), len);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_tun.c,v 1.15 1994/10/30 21:48:57 cgd Exp $ */
/* $NetBSD: if_tun.c,v 1.16 1995/03/08 02:57:09 cgd Exp $ */
/*
* Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk>
@ -102,7 +102,7 @@ tunattach(unused)
ifp->if_opackets = 0;
if_attach(ifp);
#if NBPFILTER > 0
bpfattach(&tunctl[i].tun_bpf, ifp, DLT_NULL, sizeof(u_int));
bpfattach(&tunctl[i].tun_bpf, ifp, DLT_NULL, sizeof(u_int32_t));
#endif
}
}
@ -276,10 +276,10 @@ tunoutput(ifp, m0, dst, rt)
* try to free it or keep a pointer to it).
*/
struct mbuf m;
u_int af = dst->sa_family;
u_int32_t af = dst->sa_family;
m.m_next = m0;
m.m_len = 4;
m.m_len = sizeof(af);
m.m_data = (char *)&af;
bpf_mtap(tp->tun_bpf, &m);
@ -491,10 +491,10 @@ tunwrite(dev, uio)
* try to free it or keep a pointer to it).
*/
struct mbuf m;
u_int af = AF_INET;
u_int32_t af = AF_INET;
m.m_next = top;
m.m_len = 4;
m.m_len = sizeof(af);
m.m_data = (char *)&af;
bpf_mtap(tunctl[unit].tun_bpf, &m);

View File

@ -1,4 +1,4 @@
/* $NetBSD: route.c,v 1.11 1994/06/29 06:36:42 cgd Exp $ */
/* $NetBSD: route.c,v 1.12 1995/03/08 02:57:11 cgd Exp $ */
/*
* Copyright (c) 1980, 1986, 1991, 1993
@ -175,7 +175,6 @@ ifafree(ifa)
* message from the network layer.
*
* N.B.: must be called at splnet
*
*/
int
rtredirect(dst, gateway, netmask, flags, src, rtp)
@ -270,7 +269,7 @@ out:
*/
int
rtioctl(req, data, p)
int req;
u_long req;
caddr_t data;
struct proc *p;
{

View File

@ -1,4 +1,4 @@
/* $NetBSD: route.h,v 1.6 1994/06/29 06:36:44 cgd Exp $ */
/* $NetBSD: route.h,v 1.7 1995/03/08 02:57:14 cgd Exp $ */
/*
* Copyright (c) 1980, 1986, 1993
@ -109,13 +109,13 @@ struct rtentry {
* We should eventually move it to a compat file.
*/
struct ortentry {
u_long rt_hash; /* to speed lookups */
struct sockaddr rt_dst; /* key */
struct sockaddr rt_gateway; /* value */
short rt_flags; /* up/down?, host/net */
short rt_refcnt; /* # held references */
u_long rt_use; /* raw # packets forwarded */
struct ifnet *rt_ifp; /* the answer: interface to use */
u_int32_t rt_hash; /* to speed lookups */
struct sockaddr rt_dst; /* key */
struct sockaddr rt_gateway; /* value */
int16_t rt_flags; /* up/down?, host/net */
int16_t rt_refcnt; /* # held references */
u_int32_t rt_use; /* raw # packets forwarded */
struct ifnet *rt_ifp; /* the answer: interface to use */
};
#define RTF_UP 0x1 /* route usable */
@ -256,7 +256,7 @@ struct rtentry *
rtalloc1 __P((struct sockaddr *, int));
void rtfree __P((struct rtentry *));
int rtinit __P((struct ifaddr *, int, int));
int rtioctl __P((int, caddr_t, struct proc *));
int rtioctl __P((u_long, caddr_t, struct proc *));
int rtredirect __P((struct sockaddr *, struct sockaddr *,
struct sockaddr *, int, struct sockaddr *, struct rtentry **));
int rtrequest __P((int, struct sockaddr *,

View File

@ -1,4 +1,4 @@
/* $NetBSD: rtsock.c,v 1.11 1994/06/29 06:36:46 cgd Exp $ */
/* $NetBSD: rtsock.c,v 1.12 1995/03/08 02:57:16 cgd Exp $ */
/*
* Copyright (c) 1988, 1991, 1993
@ -139,8 +139,8 @@ route_output(m, so)
struct ifaddr *ifa = 0;
#define senderr(e) { error = e; goto flush;}
if (m == 0 || ((m->m_len < sizeof(long)) &&
(m = m_pullup(m, sizeof(long))) == 0))
if (m == 0 || ((m->m_len < sizeof(int32_t)) &&
(m = m_pullup(m, sizeof(int32_t))) == 0))
return (ENOBUFS);
if ((m->m_flags & M_PKTHDR) == 0)
panic("route_output");

View File

@ -1,4 +1,4 @@
/* $NetBSD: slcompress.c,v 1.9 1994/06/29 06:36:48 cgd Exp $ */
/* $NetBSD: slcompress.c,v 1.10 1995/03/08 02:57:17 cgd Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
@ -94,7 +94,7 @@ sl_compress_init(comp, max_state)
* form).
*/
#define ENCODE(n) { \
if ((u_short)(n) >= 256) { \
if ((u_int16_t)(n) >= 256) { \
*cp++ = 0; \
cp[1] = (n); \
cp[0] = (n) >> 8; \
@ -104,7 +104,7 @@ sl_compress_init(comp, max_state)
} \
}
#define ENCODEZ(n) { \
if ((u_short)(n) >= 256 || (u_short)(n) == 0) { \
if ((u_int16_t)(n) >= 256 || (u_int16_t)(n) == 0) { \
*cp++ = 0; \
cp[1] = (n); \
cp[0] = (n) >> 8; \
@ -119,7 +119,7 @@ sl_compress_init(comp, max_state)
(f) = htonl(ntohl(f) + ((cp[1] << 8) | cp[2])); \
cp += 3; \
} else { \
(f) = htonl(ntohl(f) + (u_long)*cp++); \
(f) = htonl(ntohl(f) + (u_int32_t)*cp++); \
} \
}
@ -128,7 +128,7 @@ sl_compress_init(comp, max_state)
(f) = htons(ntohs(f) + ((cp[1] << 8) | cp[2])); \
cp += 3; \
} else { \
(f) = htons(ntohs(f) + (u_long)*cp++); \
(f) = htons(ntohs(f) + (u_int32_t)*cp++); \
} \
}
@ -137,7 +137,7 @@ sl_compress_init(comp, max_state)
(f) = htons((cp[1] << 8) | cp[2]); \
cp += 3; \
} else { \
(f) = htons((u_long)*cp++); \
(f) = htons((u_int32_t)*cp++); \
} \
}
@ -166,7 +166,7 @@ sl_compress_tcp(m, ip, comp, compress_cid)
if ((ip->ip_off & htons(0x3fff)) || m->m_len < 40)
return (TYPE_IP);
th = (struct tcphdr *)&((int *)ip)[hlen];
th = (struct tcphdr *)&((int32_t *)ip)[hlen];
if ((th->th_flags & (TH_SYN|TH_FIN|TH_RST|TH_ACK)) != TH_ACK)
return (TYPE_IP);
/*
@ -179,7 +179,7 @@ sl_compress_tcp(m, ip, comp, compress_cid)
INCR(sls_packets)
if (ip->ip_src.s_addr != cs->cs_ip.ip_src.s_addr ||
ip->ip_dst.s_addr != cs->cs_ip.ip_dst.s_addr ||
*(int *)th != ((int *)&cs->cs_ip)[cs->cs_ip.ip_hl]) {
*(int32_t *)th != ((int32_t *)&cs->cs_ip)[cs->cs_ip.ip_hl]) {
/*
* Wasn't the first -- search for it.
*
@ -200,7 +200,8 @@ sl_compress_tcp(m, ip, comp, compress_cid)
INCR(sls_searches)
if (ip->ip_src.s_addr == cs->cs_ip.ip_src.s_addr
&& ip->ip_dst.s_addr == cs->cs_ip.ip_dst.s_addr
&& *(int *)th == ((int *)&cs->cs_ip)[cs->cs_ip.ip_hl])
&& *(int32_t *)th ==
((int32_t *)&cs->cs_ip)[cs->cs_ip.ip_hl])
goto found;
} while (cs != lastcs);
@ -242,14 +243,14 @@ sl_compress_tcp(m, ip, comp, compress_cid)
* different between the previous & current datagram, we send the
* current datagram `uncompressed'.
*/
oth = (struct tcphdr *)&((int *)&cs->cs_ip)[hlen];
oth = (struct tcphdr *)&((int32_t *)&cs->cs_ip)[hlen];
deltaS = hlen;
hlen += th->th_off;
hlen <<= 2;
if (((u_short *)ip)[0] != ((u_short *)&cs->cs_ip)[0] ||
((u_short *)ip)[3] != ((u_short *)&cs->cs_ip)[3] ||
((u_short *)ip)[4] != ((u_short *)&cs->cs_ip)[4] ||
if (((u_int16_t *)ip)[0] != ((u_int16_t *)&cs->cs_ip)[0] ||
((u_int16_t *)ip)[3] != ((u_int16_t *)&cs->cs_ip)[3] ||
((u_int16_t *)ip)[4] != ((u_int16_t *)&cs->cs_ip)[4] ||
th->th_off != oth->th_off ||
(deltaS > 5 &&
BCMP(ip + 1, &cs->cs_ip + 1, (deltaS - 5) << 2)) ||
@ -274,7 +275,7 @@ sl_compress_tcp(m, ip, comp, compress_cid)
* with it. */
goto uncompressed;
if (deltaS = (u_short)(ntohs(th->th_win) - ntohs(oth->th_win))) {
if (deltaS = (u_int16_t)(ntohs(th->th_win) - ntohs(oth->th_win))) {
ENCODE(deltaS);
changes |= NEW_W;
}
@ -433,7 +434,7 @@ sl_uncompress_tcp_part(bufp, buflen, total_len, type, comp)
comp->flags &=~ SLF_TOSS;
ip->ip_p = IPPROTO_TCP;
hlen = ip->ip_hl;
hlen += ((struct tcphdr *)&((int *)ip)[hlen])->th_off;
hlen += ((struct tcphdr *)&((int32_t *)ip)[hlen])->th_off;
hlen <<= 2;
BCOPY(ip, &cs->cs_ip, hlen);
cs->cs_ip.ip_sum = 0;
@ -527,10 +528,10 @@ sl_uncompress_tcp_part(bufp, buflen, total_len, type, comp)
* this but the old slip framing won't) */
goto bad;
if ((int)cp & 3) {
if ((long)cp & 3) {
if (buflen > 0)
(void) ovbcopy(cp, (caddr_t)((int)cp &~ 3), buflen);
cp = (u_char *)((int)cp &~ 3);
(void) ovbcopy(cp, (caddr_t)((long)cp &~ 3), buflen);
cp = (u_char *)((long)cp &~ 3);
}
cp -= cs->cs_hlen;
total_len += cs->cs_hlen;
@ -540,7 +541,7 @@ sl_uncompress_tcp_part(bufp, buflen, total_len, type, comp)
/* recompute the ip header checksum */
{
register u_short *bp = (u_short *)cp;
register u_int16_t *bp = (u_int16_t *)cp;
for (changes = 0; hlen > 0; hlen -= 2)
changes += *bp++;
changes = (changes & 0xffff) + (changes >> 16);