diff options
author | des <des@FreeBSD.org> | 2008-10-23 15:53:51 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2008-10-23 15:53:51 +0000 |
commit | 66f807ed8b3634dc73d9f7526c484e43f094c0ee (patch) | |
tree | 21e792ce590e1bcf9b343890605a1b4c6a9016b3 /sys/netinet6 | |
parent | a779c60ce0a41cd14710a8a12cfa22955108b27a (diff) | |
download | FreeBSD-src-66f807ed8b3634dc73d9f7526c484e43f094c0ee.zip FreeBSD-src-66f807ed8b3634dc73d9f7526c484e43f094c0ee.tar.gz |
Retire the MALLOC and FREE macros. They are an abomination unto style(9).
MFC after: 3 months
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/in6.c | 4 | ||||
-rw-r--r-- | sys/netinet6/in6_pcb.c | 4 | ||||
-rw-r--r-- | sys/netinet6/in6_src.c | 4 | ||||
-rw-r--r-- | sys/netinet6/raw_ip6.c | 7 |
4 files changed, 9 insertions, 10 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 19fba30..4834096 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -2321,10 +2321,10 @@ in6_sin_2_v4mapsin6_in_sock(struct sockaddr **nam) struct sockaddr_in *sin_p; struct sockaddr_in6 *sin6_p; - MALLOC(sin6_p, struct sockaddr_in6 *, sizeof *sin6_p, M_SONAME, + sin6_p = malloc(sizeof *sin6_p, M_SONAME, M_WAITOK); sin_p = (struct sockaddr_in *)*nam; in6_sin_2_v4mapsin6(sin_p, sin6_p); - FREE(*nam, M_SONAME); + free(*nam, M_SONAME); *nam = (struct sockaddr *)sin6_p; } diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 506b515..724c143 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -454,7 +454,7 @@ in6_sockaddr(in_port_t port, struct in6_addr *addr_p) { struct sockaddr_in6 *sin6; - MALLOC(sin6, struct sockaddr_in6 *, sizeof *sin6, M_SONAME, M_WAITOK); + sin6 = malloc(sizeof *sin6, M_SONAME, M_WAITOK); bzero(sin6, sizeof *sin6); sin6->sin6_family = AF_INET6; sin6->sin6_len = sizeof(*sin6); @@ -477,7 +477,7 @@ in6_v4mapsin6_sockaddr(in_port_t port, struct in_addr *addr_p) sin.sin_port = port; sin.sin_addr = *addr_p; - MALLOC(sin6_p, struct sockaddr_in6 *, sizeof *sin6_p, M_SONAME, + sin6_p = malloc(sizeof *sin6_p, M_SONAME, M_WAITOK); in6_sin_2_v4mapsin6(&sin, sin6_p); diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c index 7daa76f..1bb673d 100644 --- a/sys/netinet6/in6_src.c +++ b/sys/netinet6/in6_src.c @@ -988,7 +988,7 @@ add_addrsel_policyent(struct in6_addrpolicy *newpolicy) INIT_VNET_INET6(curvnet); struct addrsel_policyent *new, *pol; - MALLOC(new, struct addrsel_policyent *, sizeof(*new), M_IFADDR, + new = malloc(sizeof(*new), M_IFADDR, M_WAITOK); ADDRSEL_XLOCK(); ADDRSEL_LOCK(); @@ -1001,7 +1001,7 @@ add_addrsel_policyent(struct in6_addrpolicy *newpolicy) &pol->ape_policy.addrmask.sin6_addr)) { ADDRSEL_UNLOCK(); ADDRSEL_XUNLOCK(); - FREE(new, M_IFADDR); + free(new, M_IFADDR); return (EEXIST); /* or override it? */ } } diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index 4fafdb1..8b99b08 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -565,15 +565,14 @@ rip6_attach(struct socket *so, int proto, struct thread *td) error = soreserve(so, rip_sendspace, rip_recvspace); if (error) return (error); - MALLOC(filter, struct icmp6_filter *, - sizeof(struct icmp6_filter), M_PCB, M_NOWAIT); + filter = malloc( sizeof(struct icmp6_filter), M_PCB, M_NOWAIT); if (filter == NULL) return (ENOMEM); INP_INFO_WLOCK(&V_ripcbinfo); error = in_pcballoc(so, &V_ripcbinfo); if (error) { INP_INFO_WUNLOCK(&V_ripcbinfo); - FREE(filter, M_PCB); + free(filter, M_PCB); return (error); } inp = (struct inpcb *)so->so_pcb; @@ -602,7 +601,7 @@ rip6_detach(struct socket *so) /* xxx: RSVP */ INP_INFO_WLOCK(&V_ripcbinfo); INP_WLOCK(inp); - FREE(inp->in6p_icmp6filt, M_PCB); + free(inp->in6p_icmp6filt, M_PCB); in6_pcbdetach(inp); in6_pcbfree(inp); INP_INFO_WUNLOCK(&V_ripcbinfo); |