summaryrefslogtreecommitdiff
path: root/xdelta3/xdelta3.c
diff options
context:
space:
mode:
authorjosh.macdonald <jmacd@users.noreply.github.com>2007-02-14 11:15:28 +0000
committerjosh.macdonald <jmacd@users.noreply.github.com>2007-02-14 11:15:28 +0000
commit21fbdf82621e2397ef244fe8bbbb76e49bf89f29 (patch)
tree26bd01f4d06d47ac04101886886620b0011985a4 /xdelta3/xdelta3.c
parent213b0440e117611ff89f6d3dc744952ecefa1bfe (diff)
fix two alloc checks in djw.h
fix setting of stream->iopt_size fix small_page_test.c
Diffstat (limited to 'xdelta3/xdelta3.c')
-rw-r--r--xdelta3/xdelta3.c6
1 files changed, 4 insertions, 2 deletions
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)
2357 memset (stream, 0, sizeof (xd3_stream)); 2357 memset (stream, 0, sizeof (xd3_stream));
2358} 2358}
2359 2359
2360#if (VCDIFF_TOOLS) 2360#if (XD3_DEBUG > 1 || VCDIFF_TOOLS)
2361static const char* 2361static const char*
2362xd3_rtype_to_string (xd3_rtype type, int print_mode) 2362xd3_rtype_to_string (xd3_rtype type, int print_mode)
2363{ 2363{
@@ -2424,7 +2424,7 @@ xd3_config_stream(xd3_stream *stream,
2424 } 2424 }
2425 else 2425 else
2426 { 2426 {
2427 stream->iopt_size = XD3_DEFAULT_IOPT_SIZE; 2427 stream->iopt_size = config->iopt_size;
2428 } 2428 }
2429 2429
2430 stream->getblk = config->getblk; 2430 stream->getblk = config->getblk;
@@ -3133,10 +3133,12 @@ xd3_iopt_get_slot (xd3_stream *stream, xd3_rinst** iptr)
3133 if (stream->iopt_unlimited) 3133 if (stream->iopt_unlimited)
3134 { 3134 {
3135 int elts = XD3_ALLOCSIZE / sizeof(xd3_rinst); 3135 int elts = XD3_ALLOCSIZE / sizeof(xd3_rinst);
3136
3136 if ((ret = xd3_alloc_iopt (stream, elts))) 3137 if ((ret = xd3_alloc_iopt (stream, elts)))
3137 { 3138 {
3138 return ret; 3139 return ret;
3139 } 3140 }
3141
3140 stream->iopt_size += elts; 3142 stream->iopt_size += elts;
3141 } 3143 }
3142 else 3144 else