* os_dep.c [!REDIRECT_MALLOC && USE_WINALLOC]
(GC_add_current_malloc_heap): Do not call GC_get_allocation_base(new_l)
if new_l is null; cast malloc() result to the type of new_l.
GC_INNER void GC_add_current_malloc_heap(void)
{
- struct GC_malloc_heap_list *new_l =
+ struct GC_malloc_heap_list *new_l = (struct GC_malloc_heap_list *)
malloc(sizeof(struct GC_malloc_heap_list));
- void * candidate = GC_get_allocation_base(new_l);
+ void *candidate;
- if (new_l == 0) return;
+ if (NULL == new_l) return;
+ candidate = GC_get_allocation_base(new_l);
if (GC_is_malloc_heap_base(candidate)) {
/* Try a little harder to find malloc heap. */
size_t req_size = 10000;