summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorBret Lambert <blambert@cvs.openbsd.org>2008-09-12 12:27:28 +0000
committerBret Lambert <blambert@cvs.openbsd.org>2008-09-12 12:27:28 +0000
commit6eaa573d6f08d7ebea8666da09484d6ce9f4e1ba (patch)
tree1de1fd591ef2ef103da41de655e40046def9c401 /sys/dev
parent19df77e4137aaf9261cf8b8f72e6bb66ea8fda77 (diff)
Remove bzero/memset calls after pool_gets by passing the PR_ZERO
flag to the pool_get call. ok art@, krw@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/systrace.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/dev/systrace.c b/sys/dev/systrace.c
index 9bce33ffe02..1efc6d3af8a 100644
--- a/sys/dev/systrace.c
+++ b/sys/dev/systrace.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: systrace.c,v 1.47 2008/01/05 07:33:37 brad Exp $ */
+/* $OpenBSD: systrace.c,v 1.48 2008/09/12 12:27:27 blambert Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* All rights reserved.
@@ -1802,8 +1802,7 @@ systrace_msg_child(struct fsystrace *fst, struct str_process *strp, pid_t npid)
struct str_message *msg;
struct str_msg_child *msg_child;
- nstrp = pool_get(&systr_proc_pl, PR_WAITOK);
- memset(nstrp, 0, sizeof(struct str_process));
+ nstrp = pool_get(&systr_proc_pl, PR_WAITOK|PR_ZERO);
DPRINTF(("%s: %p: pid %d -> pid %d\n", __func__,
nstrp, strp->pid, npid));
@@ -1832,8 +1831,7 @@ systrace_msg_policyfree(struct fsystrace *fst, struct str_policy *strpol)
struct str_process *nstrp;
struct str_message *msg;
- nstrp = pool_get(&systr_proc_pl, PR_WAITOK);
- memset(nstrp, 0, sizeof(struct str_process));
+ nstrp = pool_get(&systr_proc_pl, PR_WAITOK|PR_ZERO);
DPRINTF(("%s: free %d\n", __func__, strpol->nr));