archive-zip:write_zip_entry: Remove second reset of size variable to zero.
authorStefan Beller <stefanbeller@googlemail.com>
Sun, 26 May 2013 19:11:35 +0000 (21:11 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 29 May 2013 19:54:39 +0000 (12:54 -0700)
It is set to zero just 3 lines before.
Reported by cppcheck.

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
archive-zip.c

index a8d1193..04c2f8e 100644 (file)
@@ -231,7 +231,6 @@ static int write_zip_entry(struct archiver_args *args,
                size = 0;
                compressed_size = 0;
                buffer = NULL;
                size = 0;
                compressed_size = 0;
                buffer = NULL;
-               size = 0;
        } else if (S_ISREG(mode) || S_ISLNK(mode)) {
                enum object_type type = sha1_object_info(sha1, &size);
 
        } else if (S_ISREG(mode) || S_ISLNK(mode)) {
                enum object_type type = sha1_object_info(sha1, &size);