From ee0405c689cc8ca44522ed5dd3750cdc0c6e4ce4 Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Thu, 15 Jan 2015 20:50:16 +0900 Subject: Drop C99 features --- alloc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'alloc.h') diff --git a/alloc.h b/alloc.h index 7d23414..fa0d391 100644 --- a/alloc.h +++ b/alloc.h @@ -13,9 +13,9 @@ static inline size_t z_mult_no_oflow_(size_t n, size_t size) { - if (size != 0 && n > SIZE_MAX / size) { + if (size != 0 && n > ULONG_MAX / size) { fprintf(stderr, - "w3m: overflow in malloc, %zu*%zu\n", n, size); + "w3m: overflow in malloc, %lu*%lu\n", (unsigned long)n, (unsigned long)size); exit(1); } return n * size; -- cgit v1.2.3