]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Small optimization in CommOpener statistic accounting.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Mon, 2 Jul 2012 15:30:02 +0000 (17:30 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Mon, 2 Jul 2012 15:30:02 +0000 (17:30 +0200)
src/comm/ConnOpener.cc

index f8d464fbe82752813de134116a2e4faf265a2d76..556742e7ca0ff5c114a9d044e91da90421ade9e2 100644 (file)
@@ -202,8 +202,8 @@ Comm::ConnOpener::connected()
      * based on the max-conn option.  We need to increment here,
      * even if the connection may fail.
      */
-    if (conn_->getPeer())
-        conn_->getPeer()->stats.conn_open++;
+    if (peer *peer=(conn_->getPeer()))
+        ++peer->stats.conn_open;
 
     lookupLocalAddress();