diff lib-src/yow.c @ 49802:dc31cb80909b

(yow): Cast result of malloc and realloc. (malloc, realloc): Declarations deleted.
author Richard M. Stallman <rms@gnu.org>
date Sat, 15 Feb 2003 10:52:52 +0000
parents 23a1cea22d13
children 695cf19ef79e
line wrap: on
line diff
--- a/lib-src/yow.c	Sat Feb 15 10:51:39 2003 +0000
+++ b/lib-src/yow.c	Sat Feb 15 10:52:52 2003 +0000
@@ -50,10 +50,6 @@
     &res;})
 #endif
 
-#ifndef HAVE_STDLIB_H
-char *malloc __P ((size_t size))), *realloc __P ((POINTER_TYPE *ptr, size_t size));
-#endif
-
 void yow();
 void setup_yow();
 
@@ -158,7 +154,7 @@
   }
 
   bufsize = BUFSIZE;
-  buf = malloc(bufsize);
+  buf = (char *) malloc(bufsize);
   if (buf == (char *)0) {
     fprintf(stderr, "yow: virtual memory exhausted\n");
     exit (3);
@@ -171,7 +167,7 @@
     if (i == bufsize-1) {
       /* Yow! Is this quotation too long yet? */
       bufsize *= 2;
-      buf = realloc(buf, bufsize);
+      buf = (char *) realloc(buf, bufsize);
       if (buf == (char *)0) {
 	fprintf(stderr, "yow: virtual memory exhausted\n");
 	exit (3);