From: robertc <> Date: Sun, 22 Jun 2003 13:47:43 +0000 (+0000) Subject: Summary: Ensure that pconns start with no recorded fd's. X-Git-Tag: SQUID_3_0_PRE1~101 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=33a5f92e76e67f882359775851d36094ff1f697c;p=thirdparty%2Fsquid.git Summary: Ensure that pconns start with no recorded fd's. Keywords: Ensure that pconns start with no recorded fd's. Technically, this isn't needed, as cbdata is meant to return cleared memory, but it's good practice to explicitly initialise required values. (And, as we get more C++ syntax, the compiler will optimise that as part of operator new). --- diff --git a/src/pconn.cc b/src/pconn.cc index d0dc6c96f1..d40ca42590 100644 --- a/src/pconn.cc +++ b/src/pconn.cc @@ -1,6 +1,6 @@ /* - * $Id: pconn.cc,v 1.37 2003/06/19 13:47:25 hno Exp $ + * $Id: pconn.cc,v 1.38 2003/06/22 07:47:43 robertc Exp $ * * DEBUG: section 48 Persistent Connections * AUTHOR: Duane Wessels @@ -90,6 +90,7 @@ static struct _pconn * p = cbdataAlloc(pconn); p->hash.key = xstrdup(key); p->nfds_alloc = PCONN_FDS_SZ; + p->nfds = 0; p->fds = (int *)memPoolAlloc(pconn_fds_pool); debug(48, 3) ("pconnNew: adding %s\n", hashKeyStr(&p->hash)); hash_join(table, &p->hash);