xfs
[Top] [All Lists]

[PATCH 1/2] dump: don't redefine min() or max()

To: xfs@xxxxxxxxxxx
Subject: [PATCH 1/2] dump: don't redefine min() or max()
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 15 Jul 2014 15:45:05 +1000
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1405403106-3084-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1405403106-3084-1-git-send-email-david@xxxxxxxxxxxxx>
From: Dave Chinner <dchinner@xxxxxxxxxx>

They are included from other header files.

Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
---
 common/util.h     | 3 ---
 restore/dirattr.c | 2 --
 restore/namreg.c  | 2 --
 restore/node.c    | 3 ---
 4 files changed, 10 deletions(-)

diff --git a/common/util.h b/common/util.h
index 529c319..86ea8d2 100644
--- a/common/util.h
+++ b/common/util.h
@@ -67,9 +67,6 @@ extern intgen_t read_buf( char *bufp,
                          intgen_t *statp );
 
 
-#define min( a, b )    ( ( ( a ) < ( b ) ) ? ( a ) : ( b ) )
-#define max( a, b )    ( ( ( a ) > ( b ) ) ? ( a ) : ( b ) )
-
 
 /* strncpyterm - like strncpy, but guarantees the destination is 
null-terminated
  */
diff --git a/restore/dirattr.c b/restore/dirattr.c
index 8a1fb06..fcfa0c8 100644
--- a/restore/dirattr.c
+++ b/restore/dirattr.c
@@ -51,8 +51,6 @@
 
 /* structure definitions used locally ****************************************/
 
-#define max( a, b )    ( ( ( a ) > ( b ) ) ? ( a ) : ( b ) )
-
 /* node handle limits
  */
 #ifdef DIRATTRCHK
diff --git a/restore/namreg.c b/restore/namreg.c
index 80d558a..41362d1 100644
--- a/restore/namreg.c
+++ b/restore/namreg.c
@@ -34,8 +34,6 @@
 
 /* structure definitions used locally ****************************************/
 
-#define max( a, b )    ( ( ( a ) > ( b ) ) ? ( a ) : ( b ) )
-
 #define NAMREG_AVGLEN  10
 
 /* persistent context for a namreg - placed in first page
diff --git a/restore/node.c b/restore/node.c
index b5df88a..4cc8fb0 100644
--- a/restore/node.c
+++ b/restore/node.c
@@ -30,9 +30,6 @@
 #include "node.h"
 #include "mmap.h"
 
-#define max( a, b )    ( ( ( a ) > ( b ) ) ? ( a ) : ( b ) )
-#define min( a, b )    ( ( ( a ) < ( b ) ) ? ( a ) : ( b ) )
-
 extern size_t pgsz;
 extern size_t pgmask;
 
-- 
2.0.0

<Prev in Thread] Current Thread [Next in Thread>