From c4c63eecc37a744c53c23da89b1ba09b9640cb6e Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 5 Feb 1999 21:29:19 +0000 Subject: Added several parentheses to MIN/MAX macros. --- lib/birdlib.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/birdlib.h b/lib/birdlib.h index f377a99..545ee1b 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 */ -- cgit v1.2.3