]> granicus.if.org Git - php/commitdiff
MFH: declare zend_mm_random() only when needed
authorAntony Dovgal <tony2001@php.net>
Tue, 6 Mar 2007 20:59:13 +0000 (20:59 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 6 Mar 2007 20:59:13 +0000 (20:59 +0000)
Zend/zend_alloc.c

index 6651ee8369274ce88f13c2222bfaa959a2496dfb..736b6303e2b248c24222ad9abc776591b99b7b66 100644 (file)
@@ -708,6 +708,7 @@ static void zend_mm_free_cache(zend_mm_heap *heap)
 }
 #endif
 
+#if ZEND_MM_HEAP_PROTECTION || ZEND_MM_COOKIES
 static void zend_mm_random(unsigned char *buf, size_t size)
 {
        size_t i = 0;
@@ -754,6 +755,7 @@ static void zend_mm_random(unsigned char *buf, size_t size)
                t = buf[i++] << 1;
     }
 }
+#endif
 
 /* Notes:
  * - This function may alter the block_sizes values to match platform alignment