diff options
author | ache <ache@FreeBSD.org> | 2003-08-31 17:55:46 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2003-08-31 17:55:46 +0000 |
commit | ab304301db89e3906744fb6a81655b9598764582 (patch) | |
tree | f75abef44b0f70973592b7edb66a319f92a1d7b2 /contrib/libreadline/xmalloc.c | |
parent | e5103242d94d5211fa44bad651caaa7a61519867 (diff) | |
download | FreeBSD-src-ab304301db89e3906744fb6a81655b9598764582.zip FreeBSD-src-ab304301db89e3906744fb6a81655b9598764582.tar.gz |
Virgin import of GNU Readline 4.3
Diffstat (limited to 'contrib/libreadline/xmalloc.c')
-rw-r--r-- | contrib/libreadline/xmalloc.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/contrib/libreadline/xmalloc.c b/contrib/libreadline/xmalloc.c index c0d0640..8985d34 100644 --- a/contrib/libreadline/xmalloc.c +++ b/contrib/libreadline/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"); |