diff options
author | 2010-01-15 18:20:23 +0000 | |
---|---|---|
committer | 2010-01-15 18:20:23 +0000 | |
commit | 2d91a10ad7339c56fb644a4da5a924f87f31336e (patch) | |
tree | 20ca0d473f4191cbb034d0289dd532c840bb4c9c /sys/netinet/tcp_subr.c | |
parent | sync (diff) | |
download | wireguard-openbsd-2d91a10ad7339c56fb644a4da5a924f87f31336e.tar.xz wireguard-openbsd-2d91a10ad7339c56fb644a4da5a924f87f31336e.zip |
Replace pool_get() + bzero() with pool_get(..., PR_ZERO).
With input from oga@ and krw@
ok oga@ krw@ thib@ markus@ mk@
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r-- | sys/netinet/tcp_subr.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 26cba61037b..5cd48cce9c8 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_subr.c,v 1.109 2009/11/13 20:54:05 claudio Exp $ */ +/* $OpenBSD: tcp_subr.c,v 1.110 2010/01/15 18:20:23 chl Exp $ */ /* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */ /* @@ -462,10 +462,9 @@ tcp_newtcpcb(struct inpcb *inp) struct tcpcb *tp; int i; - tp = pool_get(&tcpcb_pool, PR_NOWAIT); + tp = pool_get(&tcpcb_pool, PR_NOWAIT|PR_ZERO); if (tp == NULL) return ((struct tcpcb *)0); - bzero((char *) tp, sizeof(struct tcpcb)); TAILQ_INIT(&tp->t_segq); tp->t_maxseg = tcp_mssdflt; tp->t_maxopd = 0; |