summaryrefslogtreecommitdiff
path: root/Zend/zend_alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_alloc.c')
-rw-r--r--Zend/zend_alloc.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c
index d87b066fcc..5b79d3cf0b 100644
--- a/Zend/zend_alloc.c
+++ b/Zend/zend_alloc.c
@@ -370,7 +370,7 @@ static ZEND_COLD ZEND_NORETURN void zend_mm_safe_error(zend_mm_heap *heap,
size_t limit,
#if ZEND_DEBUG
const char *filename,
- uint lineno,
+ uint32_t lineno,
#endif
size_t size)
{
@@ -1234,7 +1234,7 @@ static zend_never_inline void *zend_mm_alloc_small_slow(zend_mm_heap *heap, uint
end = (zend_mm_free_slot*)((char*)bin + (bin_data_size[bin_num] * (bin_elements[bin_num] - 1)));
heap->free_slot[bin_num] = p = (zend_mm_free_slot*)((char*)bin + bin_data_size[bin_num]);
do {
- p->next_free_slot = (zend_mm_free_slot*)((char*)p + bin_data_size[bin_num]);;
+ p->next_free_slot = (zend_mm_free_slot*)((char*)p + bin_data_size[bin_num]);
#if ZEND_DEBUG
do {
zend_mm_debug_info *dbg = (zend_mm_debug_info*)((char*)p + bin_data_size[bin_num] - ZEND_MM_ALIGNED_SIZE(sizeof(zend_mm_debug_info)));
@@ -1894,7 +1894,7 @@ ZEND_API size_t zend_mm_gc(zend_mm_heap *heap)
if (free_counter == bin_elements[i]) {
has_free_pages = 1;
}
- chunk->map[page_num] = ZEND_MM_SRUN_EX(i, free_counter);;
+ chunk->map[page_num] = ZEND_MM_SRUN_EX(i, free_counter);
p = p->next_free_slot;
}
@@ -1921,7 +1921,7 @@ ZEND_API size_t zend_mm_gc(zend_mm_heap *heap)
ZEND_ASSERT(ZEND_MM_SRUN_BIN_NUM(info) == i);
if (ZEND_MM_SRUN_FREE_COUNTER(info) == bin_elements[i]) {
/* remove from cache */
- p = p->next_free_slot;;
+ p = p->next_free_slot;
*q = p;
} else {
q = &p->next_free_slot;
@@ -2509,9 +2509,6 @@ ZEND_API void* ZEND_FASTCALL _ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_D
void *p;
p = _safe_emalloc(nmemb, size, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
- if (UNEXPECTED(p == NULL)) {
- return p;
- }
memset(p, 0, size * nmemb);
return p;
}
@@ -2526,9 +2523,6 @@ ZEND_API char* ZEND_FASTCALL _estrdup(const char *s ZEND_FILE_LINE_DC ZEND_FILE_
zend_error_noreturn(E_ERROR, "Possible integer overflow in memory allocation (1 * %zu + 1)", length);
}
p = (char *) _emalloc(length + 1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
- if (UNEXPECTED(p == NULL)) {
- return p;
- }
memcpy(p, s, length+1);
return p;
}
@@ -2541,9 +2535,6 @@ ZEND_API char* ZEND_FASTCALL _estrndup(const char *s, size_t length ZEND_FILE_LI
zend_error_noreturn(E_ERROR, "Possible integer overflow in memory allocation (1 * %zu + 1)", length);
}
p = (char *) _emalloc(length + 1 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
- if (UNEXPECTED(p == NULL)) {
- return p;
- }
memcpy(p, s, length);
p[length] = 0;
return p;
@@ -2864,4 +2855,6 @@ ZEND_API void * __zend_realloc(void *p, size_t len)
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
+ * vim600: sw=4 ts=4 fdm=marker
+ * vim<600: sw=4 ts=4
*/