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/gnu/fs/ext2fs | |
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/gnu/fs/ext2fs')
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_inode.c | 6 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_lookup.c | 6 | ||||
-rw-r--r-- | sys/gnu/fs/ext2fs/ext2_vfsops.c | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/sys/gnu/fs/ext2fs/ext2_inode.c b/sys/gnu/fs/ext2fs/ext2_inode.c index 086f739..e0b79ba 100644 --- a/sys/gnu/fs/ext2fs/ext2_inode.c +++ b/sys/gnu/fs/ext2fs/ext2_inode.c @@ -409,7 +409,7 @@ ext2_indirtrunc(ip, lbn, dbn, lastbn, level, countp) } bap = (int32_t *)bp->b_data; - MALLOC(copy, int32_t *, fs->s_blocksize, M_TEMP, M_WAITOK); + copy = malloc(fs->s_blocksize, M_TEMP, M_WAITOK); bcopy((caddr_t)bap, (caddr_t)copy, (u_int)fs->s_blocksize); bzero((caddr_t)&bap[last + 1], (u_int)(NINDIR(fs) - (last + 1)) * sizeof (int32_t)); @@ -451,7 +451,7 @@ ext2_indirtrunc(ip, lbn, dbn, lastbn, level, countp) blocksreleased += blkcount; } } - FREE(copy, M_TEMP); + free(copy, M_TEMP); *countp = blocksreleased; return (allerror); } @@ -521,7 +521,7 @@ ext2_reclaim(ap) ext2_update(vp, 0); } vfs_hash_remove(vp); - FREE(vp->v_data, M_EXT2NODE); + free(vp->v_data, M_EXT2NODE); vp->v_data = 0; vnode_destroy_vobject(vp); return (0); diff --git a/sys/gnu/fs/ext2fs/ext2_lookup.c b/sys/gnu/fs/ext2fs/ext2_lookup.c index 1d47000..7788d58 100644 --- a/sys/gnu/fs/ext2fs/ext2_lookup.c +++ b/sys/gnu/fs/ext2fs/ext2_lookup.c @@ -177,7 +177,7 @@ ext2_readdir(ap) auio.uio_resid = count; auio.uio_segflg = UIO_SYSSPACE; aiov.iov_len = count; - MALLOC(dirbuf, caddr_t, count, M_TEMP, M_WAITOK); + dirbuf = malloc(count, M_TEMP, M_WAITOK); aiov.iov_base = dirbuf; error = VOP_READ(ap->a_vp, &auio, 0, ap->a_cred); if (error == 0) { @@ -237,7 +237,7 @@ ext2_readdir(ap) if (uio->uio_segflg != UIO_SYSSPACE || uio->uio_iovcnt != 1) panic("ext2_readdir: unexpected uio from NFS server"); - MALLOC(cookies, u_long *, ncookies * sizeof(u_long), M_TEMP, + cookies = malloc(ncookies * sizeof(u_long), M_TEMP, M_WAITOK); off = startoffset; for (dp = (struct ext2_dir_entry_2 *)dirbuf, @@ -251,7 +251,7 @@ ext2_readdir(ap) *ap->a_cookies = cookies; } } - FREE(dirbuf, M_TEMP); + free(dirbuf, M_TEMP); if (ap->a_eofflag) *ap->a_eofflag = VTOI(ap->a_vp)->i_size <= uio->uio_offset; return (error); diff --git a/sys/gnu/fs/ext2fs/ext2_vfsops.c b/sys/gnu/fs/ext2fs/ext2_vfsops.c index b7f766c..5e3c56c 100644 --- a/sys/gnu/fs/ext2fs/ext2_vfsops.c +++ b/sys/gnu/fs/ext2fs/ext2_vfsops.c @@ -964,7 +964,7 @@ ext2_vget(mp, ino, flags, vpp) dev = ump->um_dev; /* - * If this MALLOC() is performed after the getnewvnode() + * If this malloc() is performed after the getnewvnode() * it might block, leaving a vnode with a NULL v_data to be * found by ext2_sync() if a sync happens to fire right then, * which will cause a panic because ext2_sync() blindly |