diff options
author | 2015-02-06 23:21:58 +0000 | |
---|---|---|
committer | 2015-02-06 23:21:58 +0000 | |
commit | 4239b8225fa4f64aecb5a0fe486abd01f9e64ae2 (patch) | |
tree | bc2da4d9ac9052268d9b8328f3ed7de2e42e1e1f /usr.bin/look | |
parent | list iwm(4) in pci(4); prodded by jmc (diff) | |
download | wireguard-openbsd-4239b8225fa4f64aecb5a0fe486abd01f9e64ae2.tar.xz wireguard-openbsd-4239b8225fa4f64aecb5a0fe486abd01f9e64ae2.zip |
SIZE_MAX is standard, we should be using it in preference to the
obsolete SIZE_T_MAX. OK miod@ beck@
Diffstat (limited to 'usr.bin/look')
-rw-r--r-- | usr.bin/look/look.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/look/look.c b/usr.bin/look/look.c index 5771f627bd0..b3b7db9b7e3 100644 --- a/usr.bin/look/look.c +++ b/usr.bin/look/look.c @@ -1,4 +1,4 @@ -/* $OpenBSD: look.c,v 1.15 2014/05/20 01:25:23 guenther Exp $ */ +/* $OpenBSD: look.c,v 1.16 2015/02/06 23:21:59 millert Exp $ */ /* $NetBSD: look.c,v 1.7 1995/08/31 22:41:02 jtc Exp $ */ /*- @@ -48,7 +48,7 @@ #include <ctype.h> #include <errno.h> #include <fcntl.h> -#include <limits.h> +#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -126,7 +126,7 @@ main(int argc, char *argv[]) if ((fd = open(file, O_RDONLY, 0)) < 0 || fstat(fd, &sb)) err(2, "%s", file); - if (sb.st_size > SIZE_T_MAX) + if (sb.st_size > SIZE_MAX) errc(2, EFBIG, "%s", file); if ((front = mmap(NULL, (size_t)sb.st_size, PROT_READ, MAP_PRIVATE, fd, (off_t)0)) == MAP_FAILED) |