if (size == 0)
errorx(1, "internal error, tried to emalloc(0)");
- if ((ptr = (void *) malloc(size)) == NULL)
+ if ((ptr = malloc(size)) == NULL)
errorx(1, "unable to allocate memory");
return(ptr);
}
errorx(1, "internal error, emalloc2() overflow");
size *= nmemb;
- if ((ptr = (void *) malloc(size)) == NULL)
+ if ((ptr = malloc(size)) == NULL)
errorx(1, "unable to allocate memory");
return(ptr);
}
if (size == 0)
errorx(1, "internal error, tried to erealloc(0)");
- ptr = ptr ? (void *) realloc(ptr, size) : (void *) malloc(size);
+ ptr = ptr ? realloc(ptr, size) : malloc(size);
if (ptr == NULL)
errorx(1, "unable to allocate memory");
return(ptr);
errorx(1, "internal error, erealloc3() overflow");
size *= nmemb;
- ptr = ptr ? (void *) realloc(ptr, size) : (void *) malloc(size);
+ ptr = ptr ? realloc(ptr, size) : malloc(size);
if (ptr == NULL)
errorx(1, "unable to allocate memory");
return(ptr);