From 291ec0f2d2ce65e5ccb876b46d6468af49ddb82e Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Tue, 5 Jul 2005 17:06:09 -0700 Subject: 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. diff --git a/unpack-objects.c b/unpack-objects.c index 97d2681..6383db9 100644 --- a/unpack-objects.c +++ b/unpack-objects.c @@ -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; -- cgit v0.10.2-6-g49f6