From 66f807ed8b3634dc73d9f7526c484e43f094c0ee Mon Sep 17 00:00:00 2001 From: des Date: Thu, 23 Oct 2008 15:53:51 +0000 Subject: Retire the MALLOC and FREE macros. They are an abomination unto style(9). MFC after: 3 months --- sys/net/if_sl.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sys/net/if_sl.c') diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c index 801d3a7..f5bf533 100644 --- a/sys/net/if_sl.c +++ b/sys/net/if_sl.c @@ -271,7 +271,7 @@ slmarkstatic(int unit) if (slisstatic(unit)) return; - MALLOC(t, int *, sizeof(int) * (st_unit_max+1), M_SL, M_NOWAIT); + t = malloc(sizeof(int) * (st_unit_max+1), M_SL, M_NOWAIT); if (t == NULL) return; @@ -291,7 +291,7 @@ slcreate(void) int unit; struct mbuf *m; - MALLOC(sc, struct sl_softc *, sizeof(*sc), M_SL, M_WAITOK | M_ZERO); + sc = malloc(sizeof(*sc), M_SL, M_WAITOK | M_ZERO); sc->sc_ifp = if_alloc(IFT_SLIP); if (sc->sc_ifp == NULL) { free(sc, M_SL); @@ -664,8 +664,7 @@ sltstart(struct tty *tp) register u_char *cp; if (sc->bpfbuf == NULL) - MALLOC(sc->bpfbuf, u_char *, - SLTMAX + SLIP_HDRLEN, M_SL, M_NOWAIT); + sc->bpfbuf = malloc( SLTMAX + SLIP_HDRLEN, M_SL, M_NOWAIT); if (sc->bpfbuf) { cp = sc->bpfbuf + SLIP_HDRLEN; -- cgit v1.1