summaryrefslogtreecommitdiffstats
path: root/sys/nfs/nfs_srvcache.c
diff options
context:
space:
mode:
authorthib <thib@openbsd.org>2007-09-20 12:54:31 +0000
committerthib <thib@openbsd.org>2007-09-20 12:54:31 +0000
commit3e2586494e30471794b388e77674e2c1d0d30901 (patch)
treea6e30212c981255ea9e9e99d8dddd1fac82c3a2f /sys/nfs/nfs_srvcache.c
parentobey -F installed (diff)
downloadwireguard-openbsd-3e2586494e30471794b388e77674e2c1d0d30901.tar.xz
wireguard-openbsd-3e2586494e30471794b388e77674e2c1d0d30901.zip
MALLOC/FREE -> malloc/free + M_ZERO.
Uneeded includes and casts... ok krw@
Diffstat (limited to 'sys/nfs/nfs_srvcache.c')
-rw-r--r--sys/nfs/nfs_srvcache.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/nfs/nfs_srvcache.c b/sys/nfs/nfs_srvcache.c
index 1685554c399..06cf1001b5d 100644
--- a/sys/nfs/nfs_srvcache.c
+++ b/sys/nfs/nfs_srvcache.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_srvcache.c,v 1.12 2004/12/26 21:22:14 miod Exp $ */
+/* $OpenBSD: nfs_srvcache.c,v 1.13 2007/09/20 12:54:31 thib Exp $ */
/* $NetBSD: nfs_srvcache.c,v 1.12 1996/02/18 11:53:49 fvdl Exp $ */
/*
@@ -217,9 +217,7 @@ loop:
}
nfsstats.srvcache_misses++;
if (numnfsrvcache < desirednfsrvcache) {
- rp = (struct nfsrvcache *)malloc((u_long)sizeof *rp,
- M_NFSD, M_WAITOK);
- bzero((char *)rp, sizeof *rp);
+ rp = malloc(sizeof(*rp), M_NFSD, M_WAITOK|M_ZERO);
numnfsrvcache++;
rp->rc_flag = RC_LOCKED;
} else {