On Wednesday 01 July 2015 16:47:04 Ander Juaristi wrote: > Here goes the HSTS engine! Leave your comments, please. > > I must say Tim's feedback was both strict and invaluable. Two good things :D
Thank you. It is a pleasure to work with you and it is a joy to review your
code. AFAIR, my suggestions did not touch basic functionality, they were just
hints for straighten some code.
You made a very good job !
One little thing I just stumbled upon... I guess you won't need the new
function countchars().
while (match == NO_MATCH &&
(pos = strchr (k->host, '.')) && pos - k->host > 0 &&
countchars (k->host, '.') > 1)
{
IMO, you could write it as
while (match == NO_MATCH &&
(pos = strchr (k->host, '.')) && pos - k->host > 0 &&
strchr (pos + 1, '.'))
{
Best regards
Tim
signature.asc
Description: This is a digitally signed message part.
