svn commit: r238491 - head/sys/fs/smbfs
Christian Brueffer
brueffer at FreeBSD.org
Sun Jul 15 15:50:13 UTC 2012
Author: brueffer
Date: Sun Jul 15 15:50:12 2012
New Revision: 238491
URL: http://svn.freebsd.org/changeset/base/238491
Log:
Save a bzero() by using M_ZERO.
Obtained from: Dragonfly BSD (change 4faaf07c3d7ddd120deed007370aaf4d90b72ebb)
MFC after: 2 weeks
Modified:
head/sys/fs/smbfs/smbfs_node.c
Modified: head/sys/fs/smbfs/smbfs_node.c
==============================================================================
--- head/sys/fs/smbfs/smbfs_node.c Sun Jul 15 15:23:31 2012 (r238490)
+++ head/sys/fs/smbfs/smbfs_node.c Sun Jul 15 15:50:12 2012 (r238491)
@@ -223,7 +223,7 @@ loop:
if (fap == NULL)
return ENOENT;
- np = malloc(sizeof *np, M_SMBNODE, M_WAITOK);
+ np = malloc(sizeof *np, M_SMBNODE, M_WAITOK | M_ZERO);
error = getnewvnode("smbfs", mp, &smbfs_vnodeops, &vp);
if (error) {
free(np, M_SMBNODE);
@@ -235,7 +235,6 @@ loop:
return (error);
}
vp->v_type = fap->fa_attr & SMB_FA_DIR ? VDIR : VREG;
- bzero(np, sizeof(*np));
vp->v_data = np;
np->n_vnode = vp;
np->n_mount = VFSTOSMBFS(mp);
More information about the svn-src-head
mailing list