diff options
Diffstat (limited to 'lib/realloc.c')
| -rw-r--r-- | lib/realloc.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/realloc.c b/lib/realloc.c index d0d3e4ab..ccbf9913 100644 --- a/lib/realloc.c +++ b/lib/realloc.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Work around bug on some systems where realloc (NULL, 0) fails. | 1 | /* Work around bug on some systems where realloc (NULL, 0) fails. |
| 2 | Copyright (C) 1997 Free Software Foundation, Inc. | 2 | Copyright (C) 1997, 2003 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This program is free software; you can redistribute it and/or modify | 4 | This program is free software; you can redistribute it and/or modify |
| 5 | it under the terms of the GNU General Public License as published by | 5 | it under the terms of the GNU General Public License as published by |
| @@ -22,19 +22,14 @@ | |||
| 22 | #endif | 22 | #endif |
| 23 | #undef realloc | 23 | #undef realloc |
| 24 | 24 | ||
| 25 | #include <sys/types.h> | 25 | #include <stdlib.h> |
| 26 | |||
| 27 | char *malloc (); | ||
| 28 | char *realloc (); | ||
| 29 | 26 | ||
| 30 | /* Change the size of an allocated block of memory P to N bytes, | 27 | /* Change the size of an allocated block of memory P to N bytes, |
| 31 | with error checking. If N is zero, change it to 1. If P is NULL, | 28 | with error checking. If N is zero, change it to 1. If P is NULL, |
| 32 | use malloc. */ | 29 | use malloc. */ |
| 33 | 30 | ||
| 34 | char * | 31 | void * |
| 35 | rpl_realloc (p, n) | 32 | rpl_realloc (void *p, size_t n) |
| 36 | char *p; | ||
| 37 | size_t n; | ||
| 38 | { | 33 | { |
| 39 | if (n == 0) | 34 | if (n == 0) |
| 40 | n = 1; | 35 | n = 1; |
