From 122c24db48374dee47cf7a553f344ff0a6aee1e9 Mon Sep 17 00:00:00 2001 From: arr Date: Fri, 19 Apr 2002 17:45:22 +0000 Subject: - Change KM_ macro calls to the appropriate function call. - Nuke KM_ macros from port.h This is a leadin step towards cleaning up this code as I wait for some ATM cards and a ATM switch to arrive. --- sys/netatm/sigpvc/sigpvc_if.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'sys/netatm/sigpvc') diff --git a/sys/netatm/sigpvc/sigpvc_if.c b/sys/netatm/sigpvc/sigpvc_if.c index 95f588d..b484198 100644 --- a/sys/netatm/sigpvc/sigpvc_if.c +++ b/sys/netatm/sigpvc/sigpvc_if.c @@ -250,13 +250,11 @@ sigpvc_attach(smp, pip) /* * Allocate sigpvc protocol instance control block */ - pvp = (struct sigpvc *) - KM_ALLOC(sizeof(struct sigpvc), M_DEVBUF, M_NOWAIT); + pvp = malloc(sizeof(struct sigpvc), M_DEVBUF, M_NOWAIT | M_ZERO); if (pvp == NULL) { err = ENOMEM; goto done; } - KM_ZERO(pvp, sizeof(struct sigpvc)); /* * Link instance into manager's chain @@ -282,7 +280,7 @@ done: if (pvp) { UNLINK((struct siginst *)pvp, struct siginst, smp->sm_prinst, si_next); - KM_FREE(pvp, sizeof(struct sigpvc), M_DEVBUF); + free(pvp, M_DEVBUF); } } @@ -350,7 +348,7 @@ sigpvc_detach(pip) pip->pif_siginst = NULL; UNLINK((struct siginst *)pvp, struct siginst, smp->sm_prinst, si_next); - KM_FREE(pvp, sizeof(struct sigpvc), M_DEVBUF); + free(pvp, M_DEVBUF); } else { /* @@ -526,7 +524,7 @@ sigpvc_free(vcp) pip->pif_siginst = NULL; UNLINK((struct siginst *)pvp, struct siginst, smp->sm_prinst, si_next); - KM_FREE(pvp, sizeof(struct sigpvc), M_DEVBUF); + free(pvp, M_DEVBUF); } return (0); @@ -639,7 +637,7 @@ sigpvc_ioctl(code, data, arg1) avr.avp_encaps = cop->co_mpx; else avr.avp_encaps = 0; - KM_ZERO(avr.avp_owners, sizeof(avr.avp_owners)); + bzero(avr.avp_owners, sizeof(avr.avp_owners)); for (i = 0; cop && i < sizeof(avr.avp_owners); cop = cop->co_next, i += T_ATM_APP_NAME_LEN+1) { -- cgit v1.1