diff options
Diffstat (limited to 'usr.bin/hexdump/display.c')
| -rw-r--r-- | usr.bin/hexdump/display.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/hexdump/display.c b/usr.bin/hexdump/display.c index ce861b35a0f..db9506765c1 100644 --- a/usr.bin/hexdump/display.c +++ b/usr.bin/hexdump/display.c @@ -1,4 +1,4 @@ -/* $OpenBSD: display.c,v 1.20 2010/10/22 14:04:24 millert Exp $ */ +/* $OpenBSD: display.c,v 1.21 2015/01/16 06:40:08 deraadt Exp $ */ /* $NetBSD: display.c,v 1.12 2001/12/07 15:14:29 bjh21 Exp $ */ /* @@ -30,7 +30,6 @@ * SUCH DAMAGE. */ -#include <sys/param.h> #include <sys/stat.h> #include <ctype.h> @@ -43,6 +42,8 @@ #include "hexdump.h" +#define MINIMUM(a, b) (((a) < (b)) ? (a) : (b)) + enum _vflag vflag = FIRST; static off_t address; /* address/offset in stream */ @@ -253,7 +254,7 @@ get(void) return(curp); } n = fread((char *)curp + nread, sizeof(u_char), - length == -1 ? need : MIN(length, need), stdin); + length == -1 ? need : MINIMUM(length, need), stdin); if (!n) { if (ferror(stdin)) warn("%s", _argv[-1]); |
