Added several parentheses to MIN/MAX macros.

This commit is contained in:
Martin Mares 1999-02-05 21:29:19 +00:00
parent 292099d55f
commit c4c63eecc3

View file

@ -1,7 +1,7 @@
/* /*
* BIRD Library * 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. * 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 SKIP_BACK(s, i, p) ((s *)((char *)p - OFFSETOF(s, i)))
#define ALIGN(s, a) (((s)+a-1)&~(a-1)) #define ALIGN(s, a) (((s)+a-1)&~(a-1))
/* Utility-Macros */ /* Utility macros */
#define MIN(a,b) ((a<b)?a:b)
#define MAX(a,b) ((a>b)?a:b) #define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
/* Functions which don't return */ /* Functions which don't return */