From 91526aaf74d7cd0f5033fca1423bc0c532325c87 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 10 Sep 2007 21:33:31 +0000 Subject: [PATCH] remove some useless casts --- alloc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/alloc.c b/alloc.c index fd552474e..283f3d4a5 100644 --- a/alloc.c +++ b/alloc.c @@ -78,7 +78,7 @@ emalloc(size) 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); } @@ -100,7 +100,7 @@ emalloc2(nmemb, size) 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); } @@ -119,7 +119,7 @@ erealloc(ptr, size) 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); @@ -144,7 +144,7 @@ erealloc3(ptr, nmemb, size) 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); -- 2.40.0