Mercurial > hg > octave-nkf > gnulib-hg
changeset 12845:ad16dedc2e1d
removing useless parentheses in cpp #define directives
For motivation, see commit c0221df4, "define STREQ(a,b)
consistently, removing useless parentheses"
* lib/memcmp.c (CMP_LT_OR_GT): Remove useless parentheses.
* lib/mountlist.c (MNT_IGNORE): Likewise.
* lib/trim.h (trim, trim_trailing, trim_leading): Likewise.
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Mon, 01 Feb 2010 19:05:26 +0100 |
parents | aaa284caae61 |
children | 47a829b330dc |
files | ChangeLog lib/memcmp.c lib/mountlist.c lib/trim.h |
diffstat | 4 files changed, 14 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2010-02-01 Jim Meyering <meyering@redhat.com> + + removing useless parentheses in cpp #define directives + For motivation, see commit c0221df4, "define STREQ(a,b) + consistently, removing useless parentheses" + * lib/memcmp.c (CMP_LT_OR_GT): Remove useless parentheses. + * lib/mountlist.c (MNT_IGNORE): Likewise. + * lib/trim.h (trim, trim_trailing, trim_leading): Likewise. + 2010-02-01 Eric Blake <ebb9@byu.net> sys_time: use link-warning
--- a/lib/memcmp.c +++ b/lib/memcmp.c @@ -65,7 +65,7 @@ #ifdef WORDS_BIGENDIAN # define CMP_LT_OR_GT(a, b) ((a) > (b) ? 1 : -1) #else -# define CMP_LT_OR_GT(a, b) memcmp_bytes ((a), (b)) +# define CMP_LT_OR_GT(a, b) memcmp_bytes (a, b) #endif /* BE VERY CAREFUL IF YOU CHANGE THIS CODE! */
--- a/lib/mountlist.c +++ b/lib/mountlist.c @@ -125,7 +125,7 @@ #undef MNT_IGNORE #if defined MNTOPT_IGNORE && defined HAVE_HASMNTOPT -# define MNT_IGNORE(M) hasmntopt ((M), MNTOPT_IGNORE) +# define MNT_IGNORE(M) hasmntopt (M, MNTOPT_IGNORE) #else # define MNT_IGNORE(M) 0 #endif
--- a/lib/trim.h +++ b/lib/trim.h @@ -22,13 +22,12 @@ #define TRIM_BOTH 2 /* Removes trailing and leading whitespaces. */ -#define trim(s) trim2((s), TRIM_BOTH) +#define trim(s) trim2(s, TRIM_BOTH) /* Removes trailing whitespaces. */ -#define trim_trailing(s) trim2((s), TRIM_TRAILING) +#define trim_trailing(s) trim2(s, TRIM_TRAILING) /* Removes leading whitespaces. */ -#define trim_leading(s) trim2((s), TRIM_LEADING) +#define trim_leading(s) trim2(s, TRIM_LEADING) char *trim2(const char *, int); -