From 125263442378804a6538b36c25bc5d664f9abb6d Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Mon, 29 Jun 2015 13:37:34 +0000 Subject: [PATCH] nicer code for int_max. git-svn-id: file:///svn/unbound/trunk@3443 be551aaa-1e26-0410-a405-d3ace91eadb9 --- util/alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/alloc.c b/util/alloc.c index 34a5c13d8..05d2fa362 100644 --- a/util/alloc.c +++ b/util/alloc.c @@ -365,7 +365,7 @@ void *unbound_stat_malloc(size_t size) #undef calloc #endif #ifndef INT_MAX -#define INT_MAX 0xffffffff +#define INT_MAX (((int)-1)>>1) #endif /** calloc with stats */ void *unbound_stat_calloc(size_t nmemb, size_t size) -- 2.47.2