diff options
Diffstat (limited to 'usr.bin/tput/tput.c')
-rw-r--r-- | usr.bin/tput/tput.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/tput/tput.c b/usr.bin/tput/tput.c index 84bafe6e787..fbe7f672fab 100644 --- a/usr.bin/tput/tput.c +++ b/usr.bin/tput/tput.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tput.c,v 1.20 2014/10/08 04:10:47 doug Exp $ */ +/* $OpenBSD: tput.c,v 1.21 2015/01/16 06:40:13 deraadt Exp $ */ /* * Copyright (c) 1999 Todd C. Miller <Todd.Miller@courtesan.com> @@ -44,8 +44,6 @@ * SUCH DAMAGE. */ -#include <sys/param.h> - #include <ctype.h> #include <err.h> #include <curses.h> @@ -54,8 +52,11 @@ #include <stdlib.h> #include <termios.h> #include <unistd.h> +#include <limits.h> #include <string.h> +#define MAXIMUM(a, b) (((a) > (b)) ? (a) : (b)) + #include <sys/wait.h> static void init(void); @@ -229,7 +230,7 @@ process(char *cap, char *str, char **argv) } } } - arg_need = MAX(arg_need, popcount); + arg_need = MAXIMUM(arg_need, popcount); if (arg_need > 9) errx(2, "too many arguments (%d) for capability `%s'", arg_need, cap); |