aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorRichard M. Stallman2003-02-15 10:52:52 +0000
committerRichard M. Stallman2003-02-15 10:52:52 +0000
commit9fc08e73d14c455f3b9a492f0e03120866285de4 (patch)
tree7587419353876f97f9b1a54adf4122712ebd2a13 /lib-src
parent380f071e8a7acccbc9e8eedde4d156645f532569 (diff)
downloademacs-9fc08e73d14c455f3b9a492f0e03120866285de4.tar.gz
emacs-9fc08e73d14c455f3b9a492f0e03120866285de4.zip
(yow): Cast result of malloc and realloc.
(malloc, realloc): Declarations deleted.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/yow.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib-src/yow.c b/lib-src/yow.c
index fa638b06466..02bcc6642eb 100644
--- a/lib-src/yow.c
+++ b/lib-src/yow.c
@@ -50,10 +50,6 @@
50 &res;}) 50 &res;})
51#endif 51#endif
52 52
53#ifndef HAVE_STDLIB_H
54char *malloc __P ((size_t size))), *realloc __P ((POINTER_TYPE *ptr, size_t size));
55#endif
56
57void yow(); 53void yow();
58void setup_yow(); 54void setup_yow();
59 55
@@ -158,7 +154,7 @@ yow (fp)
158 } 154 }
159 155
160 bufsize = BUFSIZE; 156 bufsize = BUFSIZE;
161 buf = malloc(bufsize); 157 buf = (char *) malloc(bufsize);
162 if (buf == (char *)0) { 158 if (buf == (char *)0) {
163 fprintf(stderr, "yow: virtual memory exhausted\n"); 159 fprintf(stderr, "yow: virtual memory exhausted\n");
164 exit (3); 160 exit (3);
@@ -171,7 +167,7 @@ yow (fp)
171 if (i == bufsize-1) { 167 if (i == bufsize-1) {
172 /* Yow! Is this quotation too long yet? */ 168 /* Yow! Is this quotation too long yet? */
173 bufsize *= 2; 169 bufsize *= 2;
174 buf = realloc(buf, bufsize); 170 buf = (char *) realloc(buf, bufsize);
175 if (buf == (char *)0) { 171 if (buf == (char *)0) {
176 fprintf(stderr, "yow: virtual memory exhausted\n"); 172 fprintf(stderr, "yow: virtual memory exhausted\n");
177 exit (3); 173 exit (3);