projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72347a2
)
Don't special-case a zero-sized compression.
author
Linus Torvalds
<torvalds@g5.osdl.org>
Wed, 6 Jul 2005 00:06:09 +0000
(17:06 -0700)
committer
Linus Torvalds
<torvalds@g5.osdl.org>
Wed, 6 Jul 2005 00:06:09 +0000
(17:06 -0700)
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.
unpack-objects.c
patch
|
blob
|
history
diff --git
a/unpack-objects.c
b/unpack-objects.c
index
97d2681
..
6383db9
100644
(file)
--- 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;