changeset 49803:c6c565402859

Cast result of malloc and realloc. Don't include stdlib.h, becuase config.h does. (malloc, realloc): Declarations deleted.
author Richard M. Stallman <rms@gnu.org>
date Sat, 15 Feb 2003 10:53:55 +0000
parents dc31cb80909b
children 41a57604cb32
files lib-src/cvtmail.c
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/cvtmail.c	Sat Feb 15 10:52:52 2003 +0000
+++ b/lib-src/cvtmail.c	Sat Feb 15 10:53:55 2003 +0000
@@ -40,11 +40,7 @@
 #include <stdio.h>
 
 #ifndef HAVE_STDLIB_H
-char *malloc ();
-char *realloc ();
 char *getenv ();
-#else
-#include <stdlib.h>
 #endif
 
 char *xmalloc __P ((unsigned));
@@ -168,7 +164,7 @@
 xmalloc (size)
      unsigned size;
 {
-  char *result = malloc (size);
+  char *result = (char *) malloc (size);
   if (!result)
     fatal ("virtual memory exhausted", 0);
   return result;
@@ -179,7 +175,7 @@
      char *ptr;
      unsigned size;
 {
-  char *result = realloc (ptr, size);
+  char *result = (char *) realloc (ptr, size);
   if (!result)
     fatal ("virtual memory exhausted", 0);
   return result;