From: Wouter Wijngaards Date: Mon, 29 Jun 2015 13:37:34 +0000 (+0000) Subject: nicer code for int_max. X-Git-Tag: release-1.5.4^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=125263442378804a6538b36c25bc5d664f9abb6d;p=thirdparty%2Funbound.git nicer code for int_max. git-svn-id: file:///svn/unbound/trunk@3443 be551aaa-1e26-0410-a405-d3ace91eadb9 --- 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)