Hi, On Fri, Jun 18, 2010 at 02:01:20AM +0200, Peter Stuge wrote: > David Sommerseth wrote: > > > 3) "sizeof(common_name)" is useless... Line 745: char > > > common_name[TLS_USERNAME_LEN]; we can use directly TLS_USERNAME_LEN. > > > > Thanks a lot for the patch and all rework done. (Also: thank you to all > > reviewers!) > > > > The third and last patch looks very good! I've applied it to the > > feat_misc branch and merged it into allmerged. > > I strongly agree with Alon about sizeof() rather than a second > reference to the same define. It is the defensive way.
I'm a bit late, but I also want to second this :-) That way, if the definition of "common_name" is ever changed to a different size, e.g "TLS_USERNAME_LEN+3" or whatever, all(!) references automatically get the correct size. Defensive coding, less surprises later on. gert -- USENET is *not* the non-clickable part of WWW! //www.muc.de/~gert/ Gert Doering - Munich, Germany g...@greenie.muc.de fax: +49-89-35655025 g...@net.informatik.tu-muenchen.de