[squid-dev] typo in comm.cc assert clause?

Amos Jeffries squid3 at treenet.co.nz
Sat Jan 3 16:53:25 UTC 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 3/01/2015 10:52 a.m., Kinkie wrote:
> While working on splayfix, I am checking the places where clang 
> complains that tests are always true (or false).
> 
> In comm.cc there's this one: void commStartSslClose(const
> FdeCbParams &params) { assert(&fd_table[params.fd].ssl);
> <------------ ssl_shutdown_method(fd_table[params.fd].ssl); }
> 
> I believe that the line marked with the ASCII arrow is instead
> meant to be assert(fd_table[params.fd].ssl != NULL);
> 
> Before going ahead and touching it, I'd like if anyone could
> confirm that I'm not misinterpreting the code intentions here.

I agree. All the other testing of that .ssl member have been NULL
set/unset comparisons.

Amos

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (MingW32)

iQEcBAEBAgAGBQJUqB6FAAoJELJo5wb/XPRjaH0IANALzF3hIoglm5BS1WaYnPPT
7gwtGagkmGjtgATsF/EIak4cpIyWC4exkgqywkZbRqkAJts966LH0LbXeYjyhok/
szLpOb3N/UqrPTNWH5QgnQ3CtpC5ilxd4TMuDpFvG76REEJMQuih40sH3GUlf8DQ
KStcZbYtkk85mOtTW4+Qcvado8mqsHtfF/UqvrZ5Ch/8peNXcMgnV9Ix7wiXHIoi
+sL/EkYWc1ryAnxZhoVXOI/tXxWPODBWRJE48A7rSy3kGeSjYIXJIaTI0/7EKbqA
gfUOZK0+AflUqtNclMgNgi1r7vQHbF4kMw6WY0oZ9RVkx81U/M5Jm4hS6ha+A+o=
=UrDo
-----END PGP SIGNATURE-----


More information about the squid-dev mailing list