Re: /bzr/squid3/trunk/ r12194: Small optimization in CommOpener statistic accounting.

From: Henrik Nordström <henrik_at_henriknordstrom.net>
Date: Tue, 03 Jul 2012 08:02:30 +0200

tis 2012-07-03 klockan 07:52 +0200 skrev Kinkie:

> > ++(conn_->getPeer()->stats.conn_open);
> >
> >
> > IMHO we should consistently use bracketing as above to clarify in situations
> > like this where there is any complex location syntax.
>
> It is the latter, but I had the some doubt so I double-checked. I
> agree however that this may be not as readable as I'd like.
> Ok for the bracketing, I'll review the cases that snuck in and correct them.

Usually the other ++ works better in readability

        conn_->getPeer()->stats.conn_open++;

or even

        conn_->getPeer()->stats.conn_open += 1;

Regards
Henrik
Received on Tue Jul 03 2012 - 06:02:36 MDT

This archive was generated by hypermail 2.2.0 : Tue Jul 03 2012 - 12:00:03 MDT