diff options
author | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2002-08-23 22:02:32 +0000 |
---|---|---|
committer | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2002-08-23 22:02:32 +0000 |
commit | 84041b4c47edb0461f3b82afb77ca2d81819ebfa (patch) | |
tree | ddbca1e6f70f9c4a4b6c3c923b16603a95946b22 /readline/xmalloc.c | |
parent | f9267e152c9c4e2b150366c590674180e66d45df (diff) | |
download | binutils-gdb-84041b4c47edb0461f3b82afb77ca2d81819ebfa.tar.gz |
import of readline-4.3
Diffstat (limited to 'readline/xmalloc.c')
-rw-r--r-- | readline/xmalloc.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/readline/xmalloc.c b/readline/xmalloc.c index c0d06403a3c..8985d340d39 100644 --- a/readline/xmalloc.c +++ b/readline/xmalloc.c @@ -51,26 +51,26 @@ memory_error_and_abort (fname) /* Return a pointer to free()able block of memory large enough to hold BYTES number of bytes. If the memory cannot be allocated, print an error message and abort. */ -char * +PTR_T xmalloc (bytes) - int bytes; + size_t bytes; { - char *temp; + PTR_T temp; - temp = (char *)malloc (bytes); + temp = malloc (bytes); if (temp == 0) memory_error_and_abort ("xmalloc"); return (temp); } -char * +PTR_T xrealloc (pointer, bytes) PTR_T pointer; - int bytes; + size_t bytes; { - char *temp; + PTR_T temp; - temp = pointer ? (char *)realloc (pointer, bytes) : (char *)malloc (bytes); + temp = pointer ? realloc (pointer, bytes) : malloc (bytes); if (temp == 0) memory_error_and_abort ("xrealloc"); |