diff --git a/src/backend.cmod b/src/backend.cmod
index 38b909bce4bd758e84a04a2a12de55b2e22096e0..ea224451c3556c17abdf2bf43194c39765f6a584 100644
--- a/src/backend.cmod
+++ b/src/backend.cmod
@@ -736,9 +736,8 @@ PIKECLASS Backend
 	  struct hash_ent *new_hash;
 	  int e;
 
-	  new_heap = (struct Backend_CallOut_struct **)
-	    realloc((char *)me->call_heap,
-		    sizeof(struct Backend_CallOut_struct *)*me->call_heap_size*2);
+	  new_heap = realloc(me->call_heap,
+	    sizeof(struct Backend_CallOut_struct *)*me->call_heap_size*2);
 	  if(!new_heap)
 	    Pike_error("Not enough memory for another call_out\n");
 	  MEMSET(new_heap + me->call_heap_size, 0,
diff --git a/src/program.c b/src/program.c
index 139a8409e963cdabe7e8e7c9e06707ce536031aa..0fc854ce22cd9f22101f0662107c044963d78c45 100644
--- a/src/program.c
+++ b/src/program.c
@@ -1501,8 +1501,7 @@ void PIKE_CONCAT(low_add_to_,NAME) (struct program_state *state,	\
       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,8 +1525,7 @@ void PIKE_CONCAT(low_add_many_to_,NAME) (struct program_state *state,	\
       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,8 +1557,7 @@ void PIKE_CONCAT(add_to_,NAME) (ARGTYPE ARG) {				\
       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,8 +1584,7 @@ void PIKE_CONCAT(low_add_to_,NAME) (struct program_state *state,	\
       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,8 +1615,7 @@ void PIKE_CONCAT(low_add_to_,NAME) (struct program_state *state,	\
       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;		\