]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Summary: Ensure that pconns start with no recorded fd's.
authorrobertc <>
Sun, 22 Jun 2003 13:47:43 +0000 (13:47 +0000)
committerrobertc <>
Sun, 22 Jun 2003 13:47:43 +0000 (13:47 +0000)
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).

src/pconn.cc

index d0dc6c96f1dc668bb0690e2069e98d7b81a2709d..d40ca42590cfb89434d6bd46dd6ba55bba861953 100644 (file)
@@ -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);