summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1999-02-05 21:29:19 +0000
committerMartin Mares <mj@ucw.cz>1999-02-05 21:29:19 +0000
commitc4c63eecc37a744c53c23da89b1ba09b9640cb6e (patch)
tree1f44c8571f2d6ac06c8f2cea880ff457ffb4a75b
parent292099d55f1131d75efec647d3780e7a1a665fdf (diff)
Added several parentheses to MIN/MAX macros.
-rw-r--r--lib/birdlib.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/birdlib.h b/lib/birdlib.h
index f377a99b..545ee1b5 100644
--- a/lib/birdlib.h
+++ b/lib/birdlib.h
@@ -1,7 +1,7 @@
/*
* BIRD Library
*
- * (c) 1998 Martin Mares <mj@ucw.cz>
+ * (c) 1998--1999 Martin Mares <mj@ucw.cz>
*
* Can be freely distributed and used under the terms of the GNU GPL.
*/
@@ -15,9 +15,10 @@
#define SKIP_BACK(s, i, p) ((s *)((char *)p - OFFSETOF(s, i)))
#define ALIGN(s, a) (((s)+a-1)&~(a-1))
-/* Utility-Macros */
-#define MIN(a,b) ((a<b)?a:b)
-#define MAX(a,b) ((a>b)?a:b)
+/* Utility macros */
+
+#define MIN(a,b) (((a)<(b))?(a):(b))
+#define MAX(a,b) (((a)>(b))?(a):(b))
/* Functions which don't return */