summaryrefslogtreecommitdiffstats
path: root/usr.bin/tail/read.c
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2015-02-06 23:21:58 +0000
committermillert <millert@openbsd.org>2015-02-06 23:21:58 +0000
commit4239b8225fa4f64aecb5a0fe486abd01f9e64ae2 (patch)
treebc2da4d9ac9052268d9b8328f3ed7de2e42e1e1f /usr.bin/tail/read.c
parentlist iwm(4) in pci(4); prodded by jmc (diff)
downloadwireguard-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/tail/read.c')
-rw-r--r--usr.bin/tail/read.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/tail/read.c b/usr.bin/tail/read.c
index c2a6d0047ab..a027fa9f151 100644
--- a/usr.bin/tail/read.c
+++ b/usr.bin/tail/read.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: read.c,v 1.14 2009/10/27 23:59:44 deraadt Exp $ */
+/* $OpenBSD: read.c,v 1.15 2015/02/06 23:21:59 millert Exp $ */
/* $NetBSD: read.c,v 1.4 1994/11/23 07:42:07 jtc Exp $ */
/*-
@@ -35,10 +35,10 @@
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/limits.h>
#include <err.h>
#include <stdio.h>
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
@@ -67,7 +67,7 @@ bytes(FILE *fp, off_t off)
int wrap;
char *sp;
- if (off > SIZE_T_MAX)
+ if (off > SIZE_MAX)
errx(1, "offset too large");
if ((sp = p = malloc(off)) == NULL)
@@ -148,7 +148,7 @@ lines(FILE *fp, off_t off)
size_t cnt, recno, blen, newsize;
char *sp = NULL, *newp = NULL;
- if (off > SIZE_T_MAX)
+ if (off > SIZE_MAX)
errx(1, "offset too large");
if ((lines = calloc(off, sizeof(*lines))) == NULL)