summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Linus Torvalds <torvalds@g5.osdl.org>2005-07-05 17:06:09 -0700
committerLibravatar Linus Torvalds <torvalds@g5.osdl.org>2005-07-05 17:06:09 -0700
commit291ec0f2d2ce65e5ccb876b46d6468af49ddb82e (patch)
treea1d3a4e01516f1d924c407a9e42a6df0d13b43b6
parentMake "git clone" use the new git-clone-pack (diff)
downloadtgif-291ec0f2d2ce65e5ccb876b46d6468af49ddb82e.tar.xz
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.
-rw-r--r--unpack-objects.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/unpack-objects.c b/unpack-objects.c
index 97d2681874..6383db94ac 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;