Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-01-11 10:26:09 +0300
committerJunio C Hamano <gitster@pobox.com>2008-01-11 10:27:39 +0300
commit8c3c7b2adbac9d4fce1fcec0ca03cfb6535d5af3 (patch)
treed3686fbfb61bf76e4ad5320d32688ae169a3e872 /builtin-pack-objects.c
parent95693d45ee1c1d4b76cac672636cf31229186a18 (diff)
pack-objects: remove redundant and wrong call to deflateEnd()
We somehow called deflateEnd() on a stream that we have called deflateEnd() on already. In fact, the second deflateEnd() has always been returning Z_STREAM_ERROR. We just never checked the error return from that particular deflateEnd(). The first one returns 0 for success. We might want to tighten the check even more to check that. Noticed by Marco. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-pack-objects.c')
-rw-r--r--builtin-pack-objects.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index a39cb82c9b..ec10238e4a 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -445,7 +445,7 @@ static unsigned long write_object(struct sha1file *f,
/* nothing */;
deflateEnd(&stream);
datalen = stream.total_out;
- deflateEnd(&stream);
+
/*
* The object header is a byte of 'type' followed by zero or
* more bytes of length.