[PATCH 2/8] mtd-utils: common.h: Add MAX() macro, fix MIN()
Brian Norris
computersforpeace at gmail.com
Mon Nov 29 03:01:56 EST 2010
Add MAX() macro to common.h, to be used in future patches.
Also a style change in comma location on MIN().
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
include/common.h | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/include/common.h b/include/common.h
index 25abc0c..eb8d5fc 100644
--- a/include/common.h
+++ b/include/common.h
@@ -34,7 +34,10 @@ extern "C" {
#endif
#ifndef MIN /* some C lib headers define this for us */
-#define MIN(a ,b) ((a) < (b) ? (a) : (b))
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#endif
+#ifndef MAX
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
#endif
#define min(a, b) MIN(a, b) /* glue for linux kernel source */
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
--
1.7.0.4
More information about the linux-mtd
mailing list