summaryrefslogtreecommitdiff
path: root/regress/lib/libc/db
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2015-02-06 23:22:00 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2015-02-06 23:22:00 +0000
commit3318608864fcb14a5c03e4cf97495dbd6d23bfd7 (patch)
treee4103eeca8e2180f8253c294c942f6aa1de9c6f2 /regress/lib/libc/db
parent80c4a98d1fdcc445a241d9895e7b7e684aacec71 (diff)
SIZE_MAX is standard, we should be using it in preference to the
obsolete SIZE_T_MAX. OK miod@ beck@
Diffstat (limited to 'regress/lib/libc/db')
-rw-r--r--regress/lib/libc/db/dbtest.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/regress/lib/libc/db/dbtest.c b/regress/lib/libc/db/dbtest.c
index c28ec0db5eb..f024891a56d 100644
--- a/regress/lib/libc/db/dbtest.c
+++ b/regress/lib/libc/db/dbtest.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dbtest.c,v 1.12 2009/10/27 23:59:32 deraadt Exp $ */
+/* $OpenBSD: dbtest.c,v 1.13 2015/02/06 23:21:58 millert Exp $ */
/* $NetBSD: dbtest.c,v 1.8 1996/05/03 21:57:48 cgd Exp $ */
/*-
@@ -36,7 +36,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>
@@ -685,10 +685,8 @@ rfile(name, lenp)
if ((fd = open(name, O_RDONLY, 0)) < 0 ||
fstat(fd, &sb))
dberr("%s: %s\n", name, strerror(errno));
-#ifdef NOT_PORTABLE
- if (sb.st_size > (off_t)SIZE_T_MAX)
+ if (sb.st_size > (off_t)SIZE_MAX)
dberr("%s: %s\n", name, strerror(E2BIG));
-#endif
if ((p = (void *)malloc((u_int)sb.st_size)) == NULL)
dberr("%s", strerror(errno));
(void)read(fd, p, (int)sb.st_size);