From 3318608864fcb14a5c03e4cf97495dbd6d23bfd7 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Fri, 6 Feb 2015 23:22:00 +0000 Subject: SIZE_MAX is standard, we should be using it in preference to the obsolete SIZE_T_MAX. OK miod@ beck@ --- regress/lib/libc/db/dbtest.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'regress/lib/libc/db') 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 #include #include -#include +#include #include #include #include @@ -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); -- cgit v1.2.3