[squid-dev] [PATCH] shuffle remaining session cache code to libsecurity

Alex Rousskov rousskov at measurement-factory.com
Wed Apr 26 23:20:24 UTC 2017


On 04/26/2017 07:01 AM, Amos Jeffries wrote:

> +#if USE_OPENSSL // while Ssl:: bits in use
> +static const char *SessionCacheName = "tls_session_cache";
> +static Ipc::MemMap *SessionCache = nullptr;
> +#endif

What does the above comment mean? I could not guess based on a few other
occurrences of the same comment, and I do not see any "Ssl::" bits in
the above code.


> +    if (auto *slotW = SessionCache->openForWriting((const cache_key*)key, pos)) {

In general, I recommend removing "*" after "auto" because the condition
and the code protected by it does not care whether the variable is a raw
pointer, a smart pointer, or (in some cases) something else with a
to-boolean conversion.

"auto" needs "const" and "&" but not "*".


Thank you,

Alex.



More information about the squid-dev mailing list