~ashn/cdoc

389b94d9fc44b48e0e8d073ec956b8b2ff2769bc — ashn 9 months ago f3a8b7a
Make xalloc less "clever"
1 files changed, 3 insertions(+), 2 deletions(-)

M cdoc.c
M cdoc.c => cdoc.c +3 -2
@@ 277,10 277,11 @@ static void*
xalloc(void* ptr, size_t size)
{
    if (size == 0) {
        return free(ptr), NULL;
        free(ptr);
        return NULL;
    }
    if ((ptr = realloc(ptr, size)) == NULL) {
        errorf("Out of memory");
        errorf("[%s] Out of memory", __func__);
    }
    return ptr;
}