summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2014-07-13 19:00:56 +0200
committer/dev/humancontroller <devhc@example.com>2017-03-09 13:51:12 +0100
commitce729d1a78cc5c4c6d880e0f8489ad546acd3247 (patch)
treea7a220ae34e8f094acc03cee0fc0fed21f588728
parent9abedc8d181e5c460a88e62809f746abf0f8a8c5 (diff)
use MIN() instead of min()
-rw-r--r--src/game/bg_lib.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/game/bg_lib.c b/src/game/bg_lib.c
index 4f9ee094..c233e5f6 100644
--- a/src/game/bg_lib.c
+++ b/src/game/bg_lib.c
@@ -75,10 +75,6 @@ static const char rcsid[] =
static char* med3(char *, char *, char *, cmp_t *);
static void swapfunc(char *, char *, int, int);
-#ifndef min
-#define min(a, b) ((a) < (b) ? (a) : (b))
-#endif
-
/*
* Qsort routine from Bentley & McIlroy's "Engineering a Sort Function".
*/
@@ -194,9 +190,9 @@ loop: SWAPINIT(a, es);
}
pn = (char *)a + n * es;
- r = min(pa - (char *)a, pb - pa);
+ r = MIN(pa - (char *)a, pb - pa);
vecswap(a, pb - r, r);
- r = min(pd - pc, pn - pd - es);
+ r = MIN(pd - pc, pn - pd - es);
vecswap(pb, pn - r, r);
if ((r = pb - pa) > es)
qsort(a, r / es, es, cmp);