aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorRichard M. Stallman2003-02-15 10:53:55 +0000
committerRichard M. Stallman2003-02-15 10:53:55 +0000
commit2a61b9d244656497d66a3bd82b403ecab8153ba3 (patch)
tree285af0ec67b2a98caa624f9b26aaf6a4c6c06d8f /lib-src
parent9fc08e73d14c455f3b9a492f0e03120866285de4 (diff)
downloademacs-2a61b9d244656497d66a3bd82b403ecab8153ba3.tar.gz
emacs-2a61b9d244656497d66a3bd82b403ecab8153ba3.zip
Cast result of malloc and realloc.
Don't include stdlib.h, becuase config.h does. (malloc, realloc): Declarations deleted.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/cvtmail.c8
1 files changed, 2 insertions, 6 deletions
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. */
40#include <stdio.h> 40#include <stdio.h>
41 41
42#ifndef HAVE_STDLIB_H 42#ifndef HAVE_STDLIB_H
43char *malloc ();
44char *realloc ();
45char *getenv (); 43char *getenv ();
46#else
47#include <stdlib.h>
48#endif 44#endif
49 45
50char *xmalloc __P ((unsigned)); 46char *xmalloc __P ((unsigned));
@@ -168,7 +164,7 @@ char *
168xmalloc (size) 164xmalloc (size)
169 unsigned size; 165 unsigned size;
170{ 166{
171 char *result = malloc (size); 167 char *result = (char *) malloc (size);
172 if (!result) 168 if (!result)
173 fatal ("virtual memory exhausted", 0); 169 fatal ("virtual memory exhausted", 0);
174 return result; 170 return result;
@@ -179,7 +175,7 @@ xrealloc (ptr, size)
179 char *ptr; 175 char *ptr;
180 unsigned size; 176 unsigned size;
181{ 177{
182 char *result = realloc (ptr, size); 178 char *result = (char *) realloc (ptr, size);
183 if (!result) 179 if (!result)
184 fatal ("virtual memory exhausted", 0); 180 fatal ("virtual memory exhausted", 0);
185 return result; 181 return result;