From: Francesco Chemolli Date: Mon, 2 Jul 2012 15:30:02 +0000 (+0200) Subject: Small optimization in CommOpener statistic accounting. X-Git-Tag: sourceformat-review-1~198 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=b79bfaae548be11c128b94dea63ef02705001942;p=thirdparty%2Fsquid.git Small optimization in CommOpener statistic accounting. --- diff --git a/src/comm/ConnOpener.cc b/src/comm/ConnOpener.cc index f8d464fbe8..556742e7ca 100644 --- a/src/comm/ConnOpener.cc +++ b/src/comm/ConnOpener.cc @@ -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();