From 21fbdf82621e2397ef244fe8bbbb76e49bf89f29 Mon Sep 17 00:00:00 2001 From: "josh.macdonald" Date: Wed, 14 Feb 2007 11:15:28 +0000 Subject: fix two alloc checks in djw.h fix setting of stream->iopt_size fix small_page_test.c --- xdelta3/xdelta3.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'xdelta3/xdelta3.c') diff --git a/xdelta3/xdelta3.c b/xdelta3/xdelta3.c index 5535d07..7042903 100644 --- a/xdelta3/xdelta3.c +++ b/xdelta3/xdelta3.c @@ -2357,7 +2357,7 @@ xd3_free_stream (xd3_stream *stream) memset (stream, 0, sizeof (xd3_stream)); } -#if (VCDIFF_TOOLS) +#if (XD3_DEBUG > 1 || VCDIFF_TOOLS) static const char* xd3_rtype_to_string (xd3_rtype type, int print_mode) { @@ -2424,7 +2424,7 @@ xd3_config_stream(xd3_stream *stream, } else { - stream->iopt_size = XD3_DEFAULT_IOPT_SIZE; + stream->iopt_size = config->iopt_size; } stream->getblk = config->getblk; @@ -3133,10 +3133,12 @@ xd3_iopt_get_slot (xd3_stream *stream, xd3_rinst** iptr) if (stream->iopt_unlimited) { int elts = XD3_ALLOCSIZE / sizeof(xd3_rinst); + if ((ret = xd3_alloc_iopt (stream, elts))) { return ret; } + stream->iopt_size += elts; } else -- cgit v1.2.3