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/net/if.c | |
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/net/if.c')
-rw-r--r-- | sys/net/if.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 7bf1ecb..e8e00e0 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -2299,14 +2299,14 @@ if_allocmulti(struct ifnet *ifp, struct sockaddr *sa, struct sockaddr *llsa, struct ifmultiaddr *ifma; struct sockaddr *dupsa; - MALLOC(ifma, struct ifmultiaddr *, sizeof *ifma, M_IFMADDR, mflags | + ifma = malloc(sizeof *ifma, M_IFMADDR, mflags | M_ZERO); if (ifma == NULL) return (NULL); - MALLOC(dupsa, struct sockaddr *, sa->sa_len, M_IFMADDR, mflags); + dupsa = malloc(sa->sa_len, M_IFMADDR, mflags); if (dupsa == NULL) { - FREE(ifma, M_IFMADDR); + free(ifma, M_IFMADDR); return (NULL); } bcopy(sa, dupsa, sa->sa_len); @@ -2321,10 +2321,10 @@ if_allocmulti(struct ifnet *ifp, struct sockaddr *sa, struct sockaddr *llsa, return (ifma); } - MALLOC(dupsa, struct sockaddr *, llsa->sa_len, M_IFMADDR, mflags); + dupsa = malloc(llsa->sa_len, M_IFMADDR, mflags); if (dupsa == NULL) { - FREE(ifma->ifma_addr, M_IFMADDR); - FREE(ifma, M_IFMADDR); + free(ifma->ifma_addr, M_IFMADDR); + free(ifma, M_IFMADDR); return (NULL); } bcopy(llsa, dupsa, llsa->sa_len); @@ -2349,9 +2349,9 @@ if_freemulti(struct ifmultiaddr *ifma) ("if_freemulti: protospec not NULL")); if (ifma->ifma_lladdr != NULL) - FREE(ifma->ifma_lladdr, M_IFMADDR); - FREE(ifma->ifma_addr, M_IFMADDR); - FREE(ifma, M_IFMADDR); + free(ifma->ifma_lladdr, M_IFMADDR); + free(ifma->ifma_addr, M_IFMADDR); + free(ifma, M_IFMADDR); } /* @@ -2469,13 +2469,13 @@ if_addmulti(struct ifnet *ifp, struct sockaddr *sa, } if (llsa != NULL) - FREE(llsa, M_IFMADDR); + free(llsa, M_IFMADDR); return (0); free_llsa_out: if (llsa != NULL) - FREE(llsa, M_IFMADDR); + free(llsa, M_IFMADDR); unlock_out: IF_ADDR_UNLOCK(ifp); |