summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>1998-07-09 19:36:05 +0000
committerPavel Machek <pavel@ucw.cz>1998-07-09 19:36:05 +0000
commitcf3527e2f4f1f4009fa332e6284b8904c24d0d43 (patch)
tree5d0519a24547f47a2ad522e0309fb664dd108de4 /lib
parentaea2dcabdc4ed80172ac8d4f5c4d31bc8607d1e7 (diff)
Adding MIN()/MAX() macros
Diffstat (limited to 'lib')
-rw-r--r--lib/birdlib.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/birdlib.h b/lib/birdlib.h
index 9696f9dc..3d235c9e 100644
--- a/lib/birdlib.h
+++ b/lib/birdlib.h
@@ -15,6 +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)
+
/* Functions which don't return */
#define NORET __attribute__((noreturn))