diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/isofs/cd9660/cd9660_lookup.c | 8 | ||||
-rw-r--r-- | sys/isofs/cd9660/cd9660_node.c | 9 | ||||
-rw-r--r-- | sys/isofs/cd9660/cd9660_vnops.c | 22 | ||||
-rw-r--r-- | sys/isofs/udf/udf_vnops.c | 7 |
4 files changed, 21 insertions, 25 deletions
diff --git a/sys/isofs/cd9660/cd9660_lookup.c b/sys/isofs/cd9660/cd9660_lookup.c index fe1d4f562cc..6f913280309 100644 --- a/sys/isofs/cd9660/cd9660_lookup.c +++ b/sys/isofs/cd9660/cd9660_lookup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_lookup.c,v 1.14 2007/06/06 17:15:13 deraadt Exp $ */ +/* $OpenBSD: cd9660_lookup.c,v 1.15 2007/10/29 13:02:19 chl Exp $ */ /* $NetBSD: cd9660_lookup.c,v 1.18 1997/05/08 16:19:59 mycroft Exp $ */ /*- @@ -285,14 +285,14 @@ searchloop: else ino = dbtob(bp->b_blkno) + entryoffsetinblock; dp->i_ino = ino; - MALLOC(altname, char *, NAME_MAX, M_TEMP, M_WAITOK); + altname = malloc(NAME_MAX, M_TEMP, M_WAITOK); cd9660_rrip_getname(ep,altname,&namelen,&dp->i_ino,imp); if (namelen == cnp->cn_namelen && !bcmp(name,altname,namelen)) { - FREE(altname, M_TEMP); + free(altname, M_TEMP); goto found; } - FREE(altname, M_TEMP); + free(altname, M_TEMP); ino = 0; break; } diff --git a/sys/isofs/cd9660/cd9660_node.c b/sys/isofs/cd9660/cd9660_node.c index de2e4f59f51..193b7ea5ed5 100644 --- a/sys/isofs/cd9660/cd9660_node.c +++ b/sys/isofs/cd9660/cd9660_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_node.c,v 1.19 2007/06/01 23:47:55 deraadt Exp $ */ +/* $OpenBSD: cd9660_node.c,v 1.20 2007/10/29 13:02:19 chl Exp $ */ /* $NetBSD: cd9660_node.c,v 1.17 1997/05/05 07:13:57 mycroft Exp $ */ /*- @@ -111,8 +111,7 @@ iso_dmap(device, inum, create) if (!create) return (NULL); - MALLOC(dp, struct iso_dnode *, sizeof(struct iso_dnode), M_CACHE, - M_WAITOK); + dp = malloc(sizeof(struct iso_dnode), M_CACHE, M_WAITOK); dp->i_dev = dev; dp->i_number = ino; @@ -138,7 +137,7 @@ iso_dunmap(device) if (dq) dq->d_prev = dp->d_prev; *dp->d_prev = dq; - FREE(dp, M_CACHE); + free(dp, M_CACHE); } } } @@ -285,7 +284,7 @@ cd9660_reclaim(v) vrele(ip->i_devvp); ip->i_devvp = 0; } - FREE(vp->v_data, M_ISOFSNODE); + free(vp->v_data, M_ISOFSNODE); vp->v_data = NULL; return (0); } diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c index 7ee014908ca..29168794db8 100644 --- a/sys/isofs/cd9660/cd9660_vnops.c +++ b/sys/isofs/cd9660/cd9660_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_vnops.c,v 1.43 2007/06/06 17:15:13 deraadt Exp $ */ +/* $OpenBSD: cd9660_vnops.c,v 1.44 2007/10/29 13:02:19 chl Exp $ */ /* $NetBSD: cd9660_vnops.c,v 1.42 1997/10/16 23:56:57 christos Exp $ */ /*- @@ -124,7 +124,7 @@ cd9660_mknod(ndp, vap, cred, p) if (ip->inode.iso_rdev == vap->va_rdev || vap->va_rdev == VNOVAL) { /* same as the unmapped one, delete the mapping */ remque(dp); - FREE(dp, M_CACHE); + free(dp, M_CACHE); } else /* enter new mapping */ dp->d_dev = vap->va_rdev; @@ -247,7 +247,7 @@ cd9660_getattr(v) struct uio auio; char *cp; - MALLOC(cp, char *, MAXPATHLEN, M_TEMP, M_WAITOK); + cp = malloc(MAXPATHLEN, M_TEMP, M_WAITOK); aiov.iov_base = cp; aiov.iov_len = MAXPATHLEN; auio.uio_iov = &aiov; @@ -262,7 +262,7 @@ cd9660_getattr(v) rdlnk.a_cred = ap->a_cred; if (cd9660_readlink(&rdlnk) == 0) vap->va_size = MAXPATHLEN - auio.uio_resid; - FREE(cp, M_TEMP); + free(cp, M_TEMP); } vap->va_flags = 0; vap->va_gen = 1; @@ -318,8 +318,7 @@ cd9660_read(v) } *ra; int i; - MALLOC(ra, struct ra *, sizeof *ra, - M_TEMP, M_WAITOK); + ra = malloc(sizeof *ra, M_TEMP, M_WAITOK); for (i = 0; i < MAX_RA && lblktosize(imp, (rablock + i)) < ip->i_size; i++) { @@ -328,7 +327,7 @@ cd9660_read(v) } error = breadn(vp, lbn, size, ra->blks, ra->sizes, i, NOCRED, &bp); - FREE(ra, M_TEMP); + free(ra, M_TEMP); } else error = bread(vp, lbn, size, NOCRED, &bp); ci->ci_lastr = lbn; @@ -510,7 +509,7 @@ cd9660_readdir(v) imp = dp->i_mnt; bmask = imp->im_bmask; - MALLOC(idp, struct isoreaddir *, sizeof(*idp), M_TEMP, M_WAITOK); + idp = malloc(sizeof(*idp), M_TEMP, M_WAITOK); idp->saveent.d_namlen = idp->assocent.d_namlen = 0; /* * XXX @@ -526,8 +525,7 @@ cd9660_readdir(v) * Guess the number of cookies needed. */ ncookies = uio->uio_resid / 16; - MALLOC(cookies, u_long *, ncookies * sizeof(u_long), M_TEMP, - M_WAITOK); + cookies = malloc(ncookies * sizeof(u_long), M_TEMP, M_WAITOK); idp->cookies = cookies; idp->ncookies = ncookies; } @@ -536,7 +534,7 @@ cd9660_readdir(v) if ((entryoffsetinblock = idp->curroff & bmask) && (error = cd9660_bufatoff(dp, (off_t)idp->curroff, NULL, &bp))) { - FREE(idp, M_TEMP); + free(idp, M_TEMP); return (error); } endsearch = dp->i_size; @@ -660,7 +658,7 @@ cd9660_readdir(v) uio->uio_offset = idp->uio_off; *ap->a_eofflag = idp->eofflag; - FREE(idp, M_TEMP); + free(idp, M_TEMP); return (error); } diff --git a/sys/isofs/udf/udf_vnops.c b/sys/isofs/udf/udf_vnops.c index 2a557d8385d..de369ed9b14 100644 --- a/sys/isofs/udf/udf_vnops.c +++ b/sys/isofs/udf/udf_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udf_vnops.c,v 1.28 2007/09/17 01:33:33 krw Exp $ */ +/* $OpenBSD: udf_vnops.c,v 1.29 2007/10/29 13:02:20 chl Exp $ */ /* * Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org> @@ -722,8 +722,7 @@ udf_readdir(void *v) * it left off. */ ncookies = uio->uio_resid / 8; - MALLOC(cookies, u_long *, sizeof(u_long) * ncookies, - M_TEMP, M_WAITOK); + cookies = malloc(sizeof(u_long) * ncookies, M_TEMP, M_WAITOK); uiodir.ncookies = ncookies; uiodir.cookies = cookies; uiodir.acookies = 0; @@ -807,7 +806,7 @@ udf_readdir(void *v) if (ap->a_ncookies != NULL) { if (error) - FREE(cookies, M_TEMP); + free(cookies, M_TEMP); else { *ap->a_ncookies = uiodir.acookies; *ap->a_cookies = cookies; |