[squid-dev] checklist->conn assertion in DestinationIp.cc
Amos Jeffries
squid3 at treenet.co.nz
Wed Jan 13 05:05:47 UTC 2016
On 12/01/2016 6:54 a.m., Eduard Bagdasaryan wrote:
> Hello,
>
> Attaching patch with suggested fix. The fix is
> related to bug 4378.
>
in src/acl/DestinationIp.cc
* please use a "const auto" local variable to store checklist->conn().
- that way you can avoid three de-references and method calls.
in src/acl/FilledChecklist.cc
* ACLFilledChecklist::conn() does not need to check "conn_ != nullptr"
- cbdataReferenceValid() handles that fine for this usage.
* ACLFilledChecklist::fd() needs to use conn() consistently.
- that may mean a "const auto" temporary variable to avoid multiple
conn() calls and dereferences.
- also the "!= nullptr" parts can be erased now. RefCount no longer has
the issue that !=NULL was needed for.
Thanks
Amos
More information about the squid-dev
mailing list