(bcopy, bzero) -> (memcpy, memset)
This commit is contained in:
parent
671919edee
commit
d574ffc673
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: ifname.c,v 1.5 1999/09/20 04:39:13 lukem Exp $ */
|
/* $NetBSD: ifname.c,v 1.6 1999/11/30 15:55:25 kleink Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||||
|
@ -195,7 +195,7 @@ if_nameindex()
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
bcopy(ifbuf, cp + hlen, off);
|
(void)memcpy(cp + hlen, ifbuf, off);
|
||||||
ret = (struct if_nameindex *)cp;
|
ret = (struct if_nameindex *)cp;
|
||||||
for (i = 0; i < ifn; i++) {
|
for (i = 0; i < ifn; i++) {
|
||||||
ret[i].if_index = ifx[i].if_index;
|
ret[i].if_index = ifx[i].if_index;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: rthdr.c,v 1.4 1999/09/20 04:39:18 lukem Exp $ */
|
/* $NetBSD: rthdr.c,v 1.5 1999/11/30 15:55:25 kleink Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||||
|
@ -77,7 +77,7 @@ inet6_rthdr_init(bp, type)
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case IPV6_RTHDR_TYPE_0:
|
case IPV6_RTHDR_TYPE_0:
|
||||||
ch->cmsg_len = CMSG_LEN(sizeof(struct ip6_rthdr0) - sizeof(struct in6_addr));
|
ch->cmsg_len = CMSG_LEN(sizeof(struct ip6_rthdr0) - sizeof(struct in6_addr));
|
||||||
bzero(rthdr, sizeof(struct ip6_rthdr0));
|
(void)memset(rthdr, 0, sizeof(struct ip6_rthdr0));
|
||||||
rthdr->ip6r_type = IPV6_RTHDR_TYPE_0;
|
rthdr->ip6r_type = IPV6_RTHDR_TYPE_0;
|
||||||
return(ch);
|
return(ch);
|
||||||
default:
|
default:
|
||||||
|
@ -124,7 +124,7 @@ inet6_rthdr_add(cmsg, addr, flags)
|
||||||
rt0->ip6r0_slmap[c] |= (1 << (7 - b));
|
rt0->ip6r0_slmap[c] |= (1 << (7 - b));
|
||||||
}
|
}
|
||||||
rt0->ip6r0_segleft++;
|
rt0->ip6r0_segleft++;
|
||||||
bcopy(addr, (caddr_t)rt0 + ((rt0->ip6r0_len + 1) << 3),
|
(void)memcpy((caddr_t)rt0 + ((rt0->ip6r0_len + 1) << 3), addr,
|
||||||
sizeof(struct in6_addr));
|
sizeof(struct in6_addr));
|
||||||
rt0->ip6r0_len += sizeof(struct in6_addr) >> 3;
|
rt0->ip6r0_len += sizeof(struct in6_addr) >> 3;
|
||||||
cmsg->cmsg_len = CMSG_LEN((rt0->ip6r0_len + 1) << 3);
|
cmsg->cmsg_len = CMSG_LEN((rt0->ip6r0_len + 1) << 3);
|
||||||
|
|
Loading…
Reference in New Issue