summaryrefslogtreecommitdiffstats
path: root/contrib/cvs/src/zlib.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2003-01-21 21:53:03 +0000
committerpeter <peter@FreeBSD.org>2003-01-21 21:53:03 +0000
commit821118cc49e4fb917b543aff27dfeeb48f9959cb (patch)
treeac24d0bf3321edf74c485789b0a58c0ac84bb5fb /contrib/cvs/src/zlib.c
parent3dc96f7243ece1d1f7f87b03334f840415e0db63 (diff)
downloadFreeBSD-src-821118cc49e4fb917b543aff27dfeeb48f9959cb.zip
FreeBSD-src-821118cc49e4fb917b543aff27dfeeb48f9959cb.tar.gz
Import cvs-1.11.5 onto vendor branch
Diffstat (limited to 'contrib/cvs/src/zlib.c')
-rw-r--r--contrib/cvs/src/zlib.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/cvs/src/zlib.c b/contrib/cvs/src/zlib.c
index 1fc7a72..00b3682 100644
--- a/contrib/cvs/src/zlib.c
+++ b/contrib/cvs/src/zlib.c
@@ -153,10 +153,10 @@ compress_buffer_input (closure, data, need, size, got)
bd = cb->buf->data;
if (bd == NULL)
{
- bd = ((struct buffer_data *) malloc (sizeof (struct buffer_data)));
+ bd = ((struct buffer_data *) xmalloc (sizeof (struct buffer_data)));
if (bd == NULL)
return -2;
- bd->text = (char *) malloc (BUFFER_DATA_SIZE);
+ bd->text = (char *) xmalloc (BUFFER_DATA_SIZE);
if (bd->text == NULL)
{
free (bd);
@@ -535,7 +535,7 @@ gunzip_and_write (fd, fullname, buf, size)
}
/* Read all of FD and put the gzipped data (RFC1952/RFC1951) into *BUF,
- replacing previous contents of *BUF. *BUF is malloc'd and *SIZE is
+ replacing previous contents of *BUF. *BUF is xmalloc'd and *SIZE is
its allocated size. Put the actual number of bytes of data in
*LEN. If something goes wrong, give a nonfatal error mentioning
FULLNAME as the name of the file for FD, and return 1 if we can't
@@ -561,7 +561,7 @@ read_and_gzip (fd, fullname, buf, size, len, level)
unsigned char *newbuf;
*size = 1024;
- newbuf = realloc (*buf, *size);
+ newbuf = xrealloc (*buf, *size);
if (newbuf == NULL)
{
error (0, 0, "out of memory");
@@ -622,7 +622,7 @@ read_and_gzip (fd, fullname, buf, size, len, level)
offset = zstr.next_out - *buf;
*size *= 2;
- newbuf = realloc (*buf, *size);
+ newbuf = xrealloc (*buf, *size);
if (newbuf == NULL)
{
error (0, 0, "out of memory");
OpenPOWER on IntegriCloud