summaryrefslogtreecommitdiff
path: root/regress/lib/libc
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2017-04-16 16:04:49 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2017-04-16 16:04:49 +0000
commitbeb2f038873764bbdc5df17d64c5a1b4cb945391 (patch)
treef00f9120cfce09e220042003b7802d6590fbb4de /regress/lib/libc
parent80e91814b4ea5553d0df65aa8e1b68ba326efd87 (diff)
Use INT_MAX instead of SIZE_MAX as the maximum file size we can handle.
Fixes this test on 64-bit architectures. ok visa@
Diffstat (limited to 'regress/lib/libc')
-rw-r--r--regress/lib/libc/db/dbtest.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/regress/lib/libc/db/dbtest.c b/regress/lib/libc/db/dbtest.c
index 2616276a277..5087f0a025a 100644
--- a/regress/lib/libc/db/dbtest.c
+++ b/regress/lib/libc/db/dbtest.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dbtest.c,v 1.14 2015/10/23 18:47:21 mmcc Exp $ */
+/* $OpenBSD: dbtest.c,v 1.15 2017/04/16 16:04:48 kettenis Exp $ */
/* $NetBSD: dbtest.c,v 1.8 1996/05/03 21:57:48 cgd Exp $ */
/*-
@@ -685,7 +685,7 @@ rfile(name, lenp)
if ((fd = open(name, O_RDONLY, 0)) < 0 ||
fstat(fd, &sb))
dberr("%s: %s\n", name, strerror(errno));
- if (sb.st_size > (off_t)SIZE_MAX)
+ if (sb.st_size > (off_t)INT_MAX)
dberr("%s: %s\n", name, strerror(E2BIG));
if ((p = (void *)malloc((u_int)sb.st_size)) == NULL)
dberr("%s", strerror(errno));