]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
nicer code for int_max. release-1.5.4 release-1.5.4rc1
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 29 Jun 2015 13:37:34 +0000 (13:37 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 29 Jun 2015 13:37:34 +0000 (13:37 +0000)
git-svn-id: file:///svn/unbound/trunk@3443 be551aaa-1e26-0410-a405-d3ace91eadb9

util/alloc.c

index 34a5c13d8a1c2e1112973f31b7967dd4474967dd..05d2fa36207ba976282e046f32f5a31de60a7e15 100644 (file)
@@ -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)