by halayli · 12y ago · 0 comments
assert(parsed == strlen(buf));
He's calling strlen(buf) twice here. There's no guarantee that this is optimized at compile time. Usually len of buf is determined from read/recv system calls and for a fair comparison strlen should be removed here.
http://pubs.opengroup.org/onlinepubs/009695399/functions/ass...