Date: Sun, 3 Feb 2013 18:55:31 -0800 From: nwmcsween@...il.com To: "musl@...ts.openwall.com" <musl@...ts.openwall.com> Subject: Re: [PATCH 3/4] String: expand to word-at-a-time On Feb 3, 2013, at 6:24 PM, Isaac Dunham <idunham@...abit.com> wrote: > On Mon, 4 Feb 2013 00:12:14 +0000 > Nathan McSween <nwmcsween@...il.com> wrote: > >> -int strcmp(const char *l, const char *r) >> +/** >> + * strcmp - Word sized c standard strcmp. >> + * @c: Comparative >> + * @s: Source >> + */ > I have a few comments: > > 1: Why "comparative" and "source" instead of left/right? > Source implies that there's copying going on, which there isn't (at least in terms of the API). > s1/s2 or l/r is much more understandable. > 2: For that many lines, you might as well explain what's going on: > /* Indicate whether string c is less than, greater than, or > equal to string s */ > The comments are useless without the standard, and superfluous > with it. Just personal preference really. It's nicer imo to have short args names and a blurb on what they stand for >> +#undef strcmp > Huh? > I don't see why this is needed, unless you messed up your build environment. > >> +int strcmp(const char *c, const char *s) > > What's the effect of all this on size of the binary? > I see that all this ends up adding ~150 lines. With the expanded to word-at-a-time fns it adds a bit with just the refactorings it removes a bit. Not at my workstation atm though. > Is shortening the length of the variable names really useful? Preference, the only reason for the longer names in the args is usually due to say void * to unsigned char * for comparison, etc purposes > -- > Isaac Dunham <idunham@...abit.com> >
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.