diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2009-04-22 01:16:12 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2009-04-22 01:16:12 +0000 |
commit | 83c58e3ed9556507b455f313f544ee7954c2343a (patch) | |
tree | 649ae108d2326997075f3d4f6ccce15019622a1d | |
parent | 58c0612742f8891acc019802ac9e067982bfb48b (diff) |
initialise the constructor and destructor function pointers to NULL
in pool_init so you the pool struct doesn't have to be zeroed before
you init it.
-rw-r--r-- | sys/kern/subr_pool.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/subr_pool.c b/sys/kern/subr_pool.c index 321e770938c..28428f41c54 100644 --- a/sys/kern/subr_pool.c +++ b/sys/kern/subr_pool.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_pool.c,v 1.78 2009/02/17 07:53:55 deraadt Exp $ */ +/* $OpenBSD: subr_pool.c,v 1.79 2009/04/22 01:16:11 dlg Exp $ */ /* $NetBSD: subr_pool.c,v 1.61 2001/09/26 07:14:56 chs Exp $ */ /*- @@ -333,6 +333,11 @@ pool_init(struct pool *pp, size_t size, u_int align, u_int ioff, int flags, if (pool_serial == 0) panic("pool_init: too much uptime"); + /* constructor, destructor, and arg */ + pp->pr_ctor = NULL; + pp->pr_dtor = NULL; + pp->pr_arg = NULL; + /* * Decide whether to put the page header off page to avoid * wasting too large a part of the page. Off-page page headers |