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/netncp | |
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/netncp')
-rw-r--r-- | sys/netncp/ncp_conn.c | 10 | ||||
-rw-r--r-- | sys/netncp/ncp_rq.c | 2 | ||||
-rw-r--r-- | sys/netncp/ncp_sock.c | 4 | ||||
-rw-r--r-- | sys/netncp/ncp_subr.c | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/sys/netncp/ncp_conn.c b/sys/netncp/ncp_conn.c index 7848d48..5b61dfe 100644 --- a/sys/netncp/ncp_conn.c +++ b/sys/netncp/ncp_conn.c @@ -238,7 +238,7 @@ ncp_conn_alloc(struct ncp_conn_args *cap, struct thread *td, struct ucred *cred, owner->cr_uid = cap->owner; } else owner = crhold(cred); - MALLOC(ncp, struct ncp_conn *, sizeof(struct ncp_conn), + ncp = malloc(sizeof(struct ncp_conn), M_NCPDATA, M_WAITOK | M_ZERO); error = 0; lockinit(&ncp->nc_lock, PZERO, "ncplck", 0, 0); @@ -317,7 +317,7 @@ ncp_conn_free(struct ncp_conn *ncp) if (ncp->li.password) free(ncp->li.password, M_NCPDATA); crfree(ncp->nc_owner); - FREE(ncp, M_NCPDATA); + free(ncp, M_NCPDATA); return (0); } @@ -536,7 +536,7 @@ ncp_conn_gethandle(struct ncp_conn *conn, struct thread *td, struct ncp_handle * lockmgr(&lhlock, LK_RELEASE, 0); return 0; } - MALLOC(refp,struct ncp_handle *,sizeof(struct ncp_handle),M_NCPDATA, + refp = malloc(sizeof(struct ncp_handle),M_NCPDATA, M_WAITOK | M_ZERO); SLIST_INSERT_HEAD(&lhlist,refp,nh_next); refp->nh_ref++; @@ -565,7 +565,7 @@ ncp_conn_puthandle(struct ncp_handle *handle, struct thread *td, int force) } if (refp->nh_ref == 0) { SLIST_REMOVE(&lhlist, refp, ncp_handle, nh_next); - FREE(refp, M_NCPDATA); + free(refp, M_NCPDATA); } lockmgr(&lhlock, LK_RELEASE, 0); return 0; @@ -603,7 +603,7 @@ ncp_conn_putprochandles(struct thread *td) haveone = 1; hp->nh_conn->ref_cnt -= hp->nh_ref; SLIST_REMOVE(&lhlist, hp, ncp_handle, nh_next); - FREE(hp, M_NCPDATA); + free(hp, M_NCPDATA); } lockmgr(&lhlock, LK_RELEASE, 0); return haveone; diff --git a/sys/netncp/ncp_rq.c b/sys/netncp/ncp_rq.c index 38e3e54..f8f7ce2 100644 --- a/sys/netncp/ncp_rq.c +++ b/sys/netncp/ncp_rq.c @@ -67,7 +67,7 @@ ncp_rq_alloc_any(u_int32_t ptype, u_int8_t fn, struct ncp_conn *ncp, struct ncp_rq *rqp; int error; - MALLOC(rqp, struct ncp_rq *, sizeof(*rqp), M_NCPRQ, M_WAITOK); + rqp = malloc(sizeof(*rqp), M_NCPRQ, M_WAITOK); error = ncp_rq_init_any(rqp, ptype, fn, ncp, td, cred); rqp->nr_flags |= NCPR_ALLOCED; if (error) { diff --git a/sys/netncp/ncp_sock.c b/sys/netncp/ncp_sock.c index 3c4d5b9..0095f3f 100644 --- a/sys/netncp/ncp_sock.c +++ b/sys/netncp/ncp_sock.c @@ -124,7 +124,7 @@ ncp_getsockname(struct socket *so, caddr_t asa, int *alen) { *alen=len; } if (sa) - FREE(sa, M_SONAME); + free(sa, M_SONAME); return (error); } #endif @@ -369,7 +369,7 @@ ncp_watchdog(struct ncp_conn *conn) { NCPSDEBUG("send watch dog %d\n",error); break; } - if (sa) FREE(sa, M_SONAME); + if (sa) free(sa, M_SONAME); return; } diff --git a/sys/netncp/ncp_subr.c b/sys/netncp/ncp_subr.c index fd7969a..da0a6d9 100644 --- a/sys/netncp/ncp_subr.c +++ b/sys/netncp/ncp_subr.c @@ -73,7 +73,7 @@ ncp_str_dup(char *s) { len++; if (bt == 0) break; } - MALLOC(p, char*, len, M_NCPDATA, M_WAITOK); + p = malloc(len, M_NCPDATA, M_WAITOK); copyin(s, p, len); return p; } |