Branch: Tag:

2014-04-27

2014-04-27 20:50:24 by Martin Nilsson <nilsson@opera.com>

realloc takes void* and doesn't need any cast.

1501:    return; \    } \    m = MINIMUM(m*2+1,MAXVARS(NUMTYPE)); \ -  tmp = mexec_realloc((void *)state->new_program->NAME, \ -  sizeof(TYPE) * m); \ +  tmp = mexec_realloc(state->new_program->NAME, sizeof(TYPE) * m); \    if(!tmp) Pike_fatal("Out of memory.\n"); \    PIKE_CONCAT(RELOCATE_,NAME)(state->new_program, tmp); \    state->malloc_size_program->PIKE_CONCAT(num_,NAME)=m; \
1526:    n = MINIMUM(n*2+1,MAXVARS(NUMTYPE)); \    } while (m + cnt > n); \    m = n; \ -  tmp = mexec_realloc((void *)state->new_program->NAME, \ -  sizeof(TYPE) * m); \ +  tmp = mexec_realloc(state->new_program->NAME, sizeof(TYPE) * m); \    if(!tmp) Pike_fatal("Out of memory.\n"); \    PIKE_CONCAT(RELOCATE_,NAME)(state->new_program, tmp); \    state->malloc_size_program->PIKE_CONCAT(num_,NAME)=m; \
1559:    n = MINIMUM(n*2+1,MAXVARS(NUMTYPE)); \    } while (m + cnt > n); \    m = n; \ -  tmp = realloc((void *)state->new_program->NAME, \ -  sizeof(TYPE) * m); \ +  tmp = realloc(state->new_program->NAME, sizeof(TYPE) * m); \    if(!tmp) Pike_fatal("Out of memory.\n"); \    PIKE_CONCAT(RELOCATE_,NAME)(state->new_program, tmp); \    state->malloc_size_program->PIKE_CONCAT(num_,NAME)=m; \
1587:    return; \    } \    m = MINIMUM(m*2+1,MAXVARS(NUMTYPE)); \ -  tmp = realloc((void *)state->new_program->NAME, \ -  sizeof(TYPE) * m); \ +  tmp = realloc(state->new_program->NAME, sizeof(TYPE) * m); \    if(!tmp) Pike_fatal("Out of memory.\n"); \    PIKE_CONCAT(RELOCATE_,NAME)(state->new_program, tmp); \    state->malloc_size_program->PIKE_CONCAT(num_,NAME)=m; \
1619:    return; \    } \    m = MINIMUM(m*2+1,MAXVARS(NUMTYPE)); \ -  tmp = realloc((void *)state->new_program->NAME, \ -  sizeof(TYPE) * m); \ +  tmp = realloc(state->new_program->NAME, sizeof(TYPE) * m); \    if(!tmp) Pike_fatal("Out of memory.\n"); \    PIKE_CONCAT(RELOCATE_,NAME)(state->new_program, tmp); \    state->malloc_size_program->PIKE_CONCAT(num_,NAME)=m; \