diff options
author | Pavel Machek <pavel@ucw.cz> | 1998-07-09 21:36:05 +0200 |
---|---|---|
committer | Pavel Machek <pavel@ucw.cz> | 1998-07-09 21:36:05 +0200 |
commit | cf3527e2f4f1f4009fa332e6284b8904c24d0d43 (patch) | |
tree | 5d0519a24547f47a2ad522e0309fb664dd108de4 | |
parent | aea2dcabdc4ed80172ac8d4f5c4d31bc8607d1e7 (diff) | |
download | bird-cf3527e2f4f1f4009fa332e6284b8904c24d0d43.tar bird-cf3527e2f4f1f4009fa332e6284b8904c24d0d43.zip |
Adding MIN()/MAX() macros
-rw-r--r-- | lib/birdlib.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/birdlib.h b/lib/birdlib.h index 9696f9d..3d235c9 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)) |