diff options
Diffstat (limited to 'usr.bin/vi/common/util.c')
| -rw-r--r-- | usr.bin/vi/common/util.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/vi/common/util.c b/usr.bin/vi/common/util.c index d69bbbc0bae..c02210a2645 100644 --- a/usr.bin/vi/common/util.c +++ b/usr.bin/vi/common/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.9 2014/11/12 04:28:41 bentley Exp $ */ +/* $OpenBSD: util.c,v 1.10 2015/01/16 06:40:14 deraadt Exp $ */ /*- * Copyright (c) 1991, 1993, 1994 @@ -11,7 +11,6 @@ #include "config.h" -#include <sys/param.h> #include <sys/queue.h> #include <bitstring.h> @@ -24,6 +23,8 @@ #include "common.h" +#define MAXIMUM(a, b) (((a) > (b)) ? (a) : (b)) + /* * binc -- * Increase the size of a buffer. @@ -39,7 +40,7 @@ binc(SCR *sp, void *bp, size_t *bsizep, size_t min) if (min && *bsizep >= min) return (bp); - csize = *bsizep + MAX(min, 256); + csize = *bsizep + MAXIMUM(min, 256); REALLOC(sp, bp, void *, csize); if (bp == NULL) { |
