From: Richard M. Stallman Date: Sat, 15 Feb 2003 10:53:55 +0000 (+0000) Subject: Cast result of malloc and realloc. X-Git-Tag: ttn-vms-21-2-B4~11181 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2a61b9d244656497d66a3bd82b403ecab8153ba3;p=emacs.git Cast result of malloc and realloc. Don't include stdlib.h, becuase config.h does. (malloc, realloc): Declarations deleted. --- diff --git a/lib-src/cvtmail.c b/lib-src/cvtmail.c index 453267f4aad..5a4d3c70952 100644 --- a/lib-src/cvtmail.c +++ b/lib-src/cvtmail.c @@ -40,11 +40,7 @@ Boston, MA 02111-1307, USA. */ #include #ifndef HAVE_STDLIB_H -char *malloc (); -char *realloc (); char *getenv (); -#else -#include #endif char *xmalloc __P ((unsigned)); @@ -168,7 +164,7 @@ char * 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 @@ xrealloc (ptr, size) char *ptr; unsigned size; { - char *result = realloc (ptr, size); + char *result = (char *) realloc (ptr, size); if (!result) fatal ("virtual memory exhausted", 0); return result;