diff options
author | Josh MacDonald <josh.macdonald@gmail.com> | 2015-11-10 23:26:07 -0800 |
---|---|---|
committer | Josh MacDonald <josh.macdonald@gmail.com> | 2015-11-10 23:26:07 -0800 |
commit | 1d0eceaa7630f1eb3eca8a2bad1b5c649ba19dae (patch) | |
tree | 8c7287d8c07edf649b27448c510f20fa4d8ae101 /xdelta3 | |
parent | ba90d43651bfedf7bf03d9b59b1360d5c72cbd19 (diff) |
Remove incorrect emit-run assertion (valid in merge command)
Diffstat (limited to 'xdelta3')
-rw-r--r-- | xdelta3/xdelta3.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/xdelta3/xdelta3.c b/xdelta3/xdelta3.c index 239f071..985aa7f 100644 --- a/xdelta3/xdelta3.c +++ b/xdelta3/xdelta3.c | |||
@@ -2232,8 +2232,6 @@ xd3_iopt_finish_encoding (xd3_stream *stream, xd3_rinst *inst) | |||
2232 | } | 2232 | } |
2233 | case XD3_RUN: | 2233 | case XD3_RUN: |
2234 | { | 2234 | { |
2235 | XD3_ASSERT (inst->size >= MIN_MATCH); | ||
2236 | |||
2237 | if ((ret = xd3_emit_byte (stream, & DATA_TAIL (stream), inst->xtra))) { return ret; } | 2235 | if ((ret = xd3_emit_byte (stream, & DATA_TAIL (stream), inst->xtra))) { return ret; } |
2238 | 2236 | ||
2239 | stream->n_run += 1; | 2237 | stream->n_run += 1; |
@@ -3739,7 +3737,7 @@ xd3_source_match_setup (xd3_stream *stream, xoff_t srcpos) | |||
3739 | * TestNonBlockingProgress test! */ | 3737 | * TestNonBlockingProgress test! */ |
3740 | if (srcpos != 0 && srcpos == stream->match_last_srcpos) | 3738 | if (srcpos != 0 && srcpos == stream->match_last_srcpos) |
3741 | { | 3739 | { |
3742 | IF_DEBUG2(DP(RINT "[match_setup] looping failure\n")); | 3740 | IF_DEBUG1(DP(RINT "[match_setup] looping failure\n")); |
3743 | goto bad; | 3741 | goto bad; |
3744 | } | 3742 | } |
3745 | 3743 | ||
@@ -3752,15 +3750,16 @@ xd3_source_match_setup (xd3_stream *stream, xoff_t srcpos) | |||
3752 | (checked below). */ | 3750 | (checked below). */ |
3753 | if (src->frontier_pos - srcpos > src->max_winsize) | 3751 | if (src->frontier_pos - srcpos > src->max_winsize) |
3754 | { | 3752 | { |
3755 | IF_DEBUG2(DP(RINT "[match_setup] rejected due to src->max_winsize " | 3753 | IF_DEBUG1(DP(RINT "[match_setup] rejected due to src->max_winsize " |
3756 | "distance eof=%"Q"u srcpos=%"Q"u frontier_pos=%"Q"u max_winsz=%"Q"u\n", | 3754 | "distance eof=%"Q"u srcpos=%"Q"u frontier_pos=%"Q"u max_winsz=%"Q"u\n", |
3757 | xd3_source_eof (src), | 3755 | xd3_source_eof (src), |
3758 | srcpos, src->frontier_pos, src->max_winsize)); | 3756 | srcpos, src->frontier_pos, src->max_winsize)); |
3759 | goto bad; | 3757 | goto bad; |
3760 | } | 3758 | } |
3761 | 3759 | ||
3762 | IF_DEBUG2(DP(RINT "[match_setup] frontier_pos %"Q"u, srcpos %"Q"u, " | 3760 | IF_DEBUG1(DP(RINT "[match_setup] %"Q"u frontier_pos %"Q"u, srcpos %"Q"u, " |
3763 | "src->max_winsize %"Q"u\n", | 3761 | "src->max_winsize %"Q"u\n", |
3762 | stream->total_in + stream->input_position, | ||
3764 | src->frontier_pos, srcpos, src->max_winsize)); | 3763 | src->frontier_pos, srcpos, src->max_winsize)); |
3765 | 3764 | ||
3766 | /* Going backwards, the 1.5-pass algorithm allows some | 3765 | /* Going backwards, the 1.5-pass algorithm allows some |
@@ -4340,7 +4339,6 @@ xd3_verify_run_state (xd3_stream *stream, | |||
4340 | * stream->input_position reaches the value returned as | 4339 | * stream->input_position reaches the value returned as |
4341 | * *next_move_point. NB: this is one of the most expensive functions | 4340 | * *next_move_point. NB: this is one of the most expensive functions |
4342 | * in this code and also the most critical for good compression. | 4341 | * in this code and also the most critical for good compression. |
4343 | * TODO: optimize the inner loop | ||
4344 | */ | 4342 | */ |
4345 | static int | 4343 | static int |
4346 | xd3_srcwin_move_point (xd3_stream *stream, usize_t *next_move_point) | 4344 | xd3_srcwin_move_point (xd3_stream *stream, usize_t *next_move_point) |
@@ -4372,6 +4370,9 @@ xd3_srcwin_move_point (xd3_stream *stream, usize_t *next_move_point) | |||
4372 | { | 4370 | { |
4373 | *next_move_point = stream->input_position + | 4371 | *next_move_point = stream->input_position + |
4374 | (usize_t)(stream->srcwin_cksum_pos - logical_input_cksum_pos); | 4372 | (usize_t)(stream->srcwin_cksum_pos - logical_input_cksum_pos); |
4373 | IF_DEBUG1 (DP(RINT | ||
4374 | "[srcwin_move_point] %"Q"u cksum_pos greater than logical pos %"Q"u\n", | ||
4375 | stream->srcwin_cksum_pos, logical_input_cksum_pos)); | ||
4375 | return 0; | 4376 | return 0; |
4376 | } | 4377 | } |
4377 | 4378 | ||