This allows the caller to easily detect how much of the destination buffer has been used.
Signed-off-by: Simon Glass <s...@chromium.org> --- Changes in v2: None lib/bzlib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bzlib.c b/lib/bzlib.c index 5844e18..9262e40 100644 --- a/lib/bzlib.c +++ b/lib/bzlib.c @@ -1350,11 +1350,11 @@ int BZ_API(BZ2_bzBuffToBuffDecompress) strm.avail_out = *destLen; ret = BZ2_bzDecompress ( &strm ); + *destLen -= strm.avail_out; if (ret == BZ_OK) goto output_overflow_or_eof; if (ret != BZ_STREAM_END) goto errhandler; /* normal termination */ - *destLen -= strm.avail_out; BZ2_bzDecompressEnd ( &strm ); return BZ_OK; -- 2.2.0.rc0.207.ga3a616c _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot