On 03/31/2010 05:17 PM, James Youngman wrote: > #include <ctype.h> > > -#if !defined (isascii) || defined (STDC_HEADERS) > +#if !defined(isascii) || defined(STDC_HEADERS)
The gnulib style for this line is: #if !defined isascii || defined STDC_HEADERS even fewer characters. The maintainer-makefile module has a rule under 'make syntax-check' that can help enforce that style of no parenthesis inside #if defined. > -#define memcpy(dest, source, count) (bcopy((source), (dest), (count))) > +#define memcpy (dest, source, count) (bcopy ((source), (dest), (count))) Bug. C99 requires that a function-like macro be declared without a space (but it can be called with a space). Then, parenthesis inside a macro expansion are redundant inside a function call (they are required for most other types of operators, but not as function arguments). #define memcpy(dest, source, count) (bcopy (source, dest, count)) But why even bother? C89 and gnulib guarantee memcpy - it is an even better cleanup to delete all this cruft, as it is no longer necessary on modern porting platforms, and just blindly use memcpy rather than worrying about the obsolete bcopy. > #ifdef gettext_noop > -# define N_(String) gettext_noop (String) > +# define N_(String) gettext_noop(String) I don't see anything wrong with the original line. > - error(1, 0, > - _("Invalid escape sequence %s in input delimiter specification."), > - s); > + error (1, 0, > + _("Invalid escape sequence %s in input delimiter specification."), > + s); Not part of this cleanup (that is, make this commit be just whitespace changes), but another 'make syntax-check' rule states that you should use error (EXIT_FAILURE, ...) rather than error (1, ...). > - exit(1); > + exit (1); In the same boat, that same 'make syntax-check' rule recommends exit (EXIT_FAILURE) over exit (1), but not for this commit. -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Findutils-patches mailing list Findutils-patches@gnu.org http://lists.gnu.org/mailman/listinfo/findutils-patches