summaryrefslogtreecommitdiffstats
path: root/lib/zlib
diff options
context:
space:
mode:
authorLei Wen <adrian.wenl@gmail.com>2012-09-28 04:26:45 +0000
committerTom Rini <trini@ti.com>2012-09-29 07:26:08 -0700
commit869c2abbaf98e91e7c9ef71806f6c8eef91206ae (patch)
treef0a573d6e5834b743db2f611feb68099fd65e0f9 /lib/zlib
parent7a32b98dacfa2da6dace2ae1d9eff08932eec61a (diff)
downloadblackbird-obmc-uboot-869c2abbaf98e91e7c9ef71806f6c8eef91206ae.tar.gz
blackbird-obmc-uboot-869c2abbaf98e91e7c9ef71806f6c8eef91206ae.zip
lib: zlib: remove the limitation for cannot using 0 as start
We often need the requirement that compressing those memory range start from 0, but the default deflate code in zlib prevent us to do this. Considering the special case of uboot, that it could access all memory range, it is reasonable to be able to also take the address space from 0 into compression. Signed-off-by: Lei Wen <leiwen@marvell.com>
Diffstat (limited to 'lib/zlib')
-rw-r--r--lib/zlib/deflate.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/zlib/deflate.c b/lib/zlib/deflate.c
index 5c4022f3d4..9a20b70344 100644
--- a/lib/zlib/deflate.c
+++ b/lib/zlib/deflate.c
@@ -592,9 +592,7 @@ int ZEXPORT deflate (strm, flush)
}
s = strm->state;
- if (strm->next_out == Z_NULL ||
- (strm->next_in == Z_NULL && strm->avail_in != 0) ||
- (s->status == FINISH_STATE && flush != Z_FINISH)) {
+ if (s->status == FINISH_STATE && flush != Z_FINISH) {
ERR_RETURN(strm, Z_STREAM_ERROR);
}
if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR);
OpenPOWER on IntegriCloud