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 b89d1273e734286414b6d64d9b154c6a39485105..97402e30949e5375d7ac9edfdfc8f0d5b76093ee 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 847867ab932f30d92135d6b6931731103cef57d8..0c7ce5e8066b81322fe9e1a6cc0292f33f4df7ac 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 ccb08dde6cb5dfdcc2f8b5e9774780afa3c409d3..996b71a1f97ed069ffba019ac7c3a293093fd8fc 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 61880c1f6055e54206e92ed31f5f9018802cef9f..c70a16fba8abcc8eccb72d1420823e765fa9dc31 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);
-