summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorThordur I. Bjornsson <thib@cvs.openbsd.org>2008-05-22 21:27:41 +0000
committerThordur I. Bjornsson <thib@cvs.openbsd.org>2008-05-22 21:27:41 +0000
commita0de249ffa69895225b9834171edd07b191eafcb (patch)
treee07c13342493d9160836e12644ac65977b4d0228 /sys/kern
parent578abe2da9e2d6deda2ce0488cd48578721b3666 (diff)
use PR_ZERO instead of calling bzero directly
after pool_get(); ok beck@
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_prot.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 21737237f2f..1b4c8aac09a 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_prot.c,v 1.30 2007/04/03 08:05:43 art Exp $ */
+/* $OpenBSD: kern_prot.c,v 1.31 2008/05/22 21:27:40 thib Exp $ */
/* $NetBSD: kern_prot.c,v 1.33 1996/02/09 18:59:42 christos Exp $ */
/*
@@ -774,8 +774,7 @@ crget(void)
{
struct ucred *cr;
- cr = pool_get(&ucred_pool, PR_WAITOK);
- bzero((caddr_t)cr, sizeof(*cr));
+ cr = pool_get(&ucred_pool, PR_WAITOK|PR_ZERO);
cr->cr_ref = 1;
return (cr);
}