threads / patch / 33941

patcharchive-zip:write_zip_entry: Remove second reset of size variable to zero.

Subject: [PATCH] archive-zip:write_zip_entry: Remove second reset of size variable to zero.

## tl;dr

One message between May 26, 2013 and May 26, 2013. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Stefan Beller· May 26, 2013, 19:11 UTC · lore

It is set to zero just 3 lines before. Reported by cppcheck.

Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
---
 archive-zip.c | 1 -
 1 file changed, 1 deletion(-)
Show changes to archive-zip.c +0 −1
diff --git a/archive-zip.c b/archive-zip.c
index b2c4fe0..4bde019 100644
--- a/archive-zip.c
+++ b/archive-zip.c
@@ -232,7 +232,6 @@ static int write_zip_entry(struct archiver_args *args,
 		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);
 
-- 
1.8.3

← back to recent threads