removing useless parentheses in cpp #define directives
authorJim Meyering <meyering@redhat.com>
Mon, 1 Feb 2010 18:05:26 +0000 (19:05 +0100)
committerJim Meyering <meyering@redhat.com>
Tue, 2 Feb 2010 07:00:53 +0000 (08:00 +0100)
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.

ChangeLog
lib/memcmp.c
lib/mountlist.c
lib/trim.h

index b89d127..97402e3 100644 (file)
--- 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
index 847867a..0c7ce5e 100644 (file)
@@ -65,7 +65,7 @@ typedef unsigned char byte;
 #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!  */
index ccb08dd..996b71a 100644 (file)
 
 #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
index 61880c1..c70a16f 100644 (file)
 #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);
-