From: Martin Mares Date: Fri, 5 Feb 1999 21:29:19 +0000 (+0000) Subject: Added several parentheses to MIN/MAX macros. X-Git-Tag: v1.2.0~1726 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c4c63eecc37a744c53c23da89b1ba09b9640cb6e;p=thirdparty%2Fbird.git Added several parentheses to MIN/MAX macros. --- diff --git a/lib/birdlib.h b/lib/birdlib.h index f377a99b4..545ee1b5f 100644 --- a/lib/birdlib.h +++ b/lib/birdlib.h @@ -1,7 +1,7 @@ /* * BIRD Library * - * (c) 1998 Martin Mares + * (c) 1998--1999 Martin Mares * * 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) ((ab)?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 */