Branch: Tag:

2014-12-04

2014-12-04 19:26:00 by Martin Nilsson <nilsson@opera.com>

mallocs nowdays return void*, so no need to case.

74:    size_t n = l.offset + l.block_size + l.doffset;    struct ba_page * p;    if (l.alignment) { -  p = (struct ba_page*)aligned_alloc(n, l.alignment); +  p = aligned_alloc(n, l.alignment);    } else {   #ifdef DEBUG_MALLOC    /* In debug malloc mode, calling xalloc from the block alloc may result    * in a deadlock, since xalloc will call ba_alloc, which in turn may call xalloc.    */ -  p = (struct ba_page*)system_malloc(n); +  p = system_malloc(n);    if (!p) {    fprintf(stderr, "Fatal: Out of memory.\n");    exit(17);    }   #else -  p = (struct ba_page*)xalloc(n); +  p = xalloc(n);   #endif    }    ba_clear_page(a, p, &a->l);