Don't special-case a zero-sized compression.

zlib actually writes a header for that case, and while ignoring that
header will get us the right data, it will also end up messing up our
stream position.  So we actually want zlib to "uncompress" even an empty
object.
This commit is contained in:
Linus Torvalds 2005-07-05 17:06:09 -07:00
Родитель 72347a233e
Коммит 291ec0f2d2
1 изменённых файлов: 0 добавлений и 2 удалений

Просмотреть файл

@ -55,8 +55,6 @@ static void *get_data(unsigned long size)
z_stream stream;
void *buf = xmalloc(size);
if (!size)
return buf;
memset(&stream, 0, sizeof(stream));
stream.next_out = buf;