git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Stefan Beller <stefanbeller@googlemail.com>
Date
May 26, 2013, 19:11 UTC
Message-ID
<1369595495-8306-1-git-send-email-stefanbeller@googlemail.com>

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(-)
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
Message 1 of 1 in “archive-zip:write_zip_entry: Remove second reset of size variable to zero.”
  1. archive-zip:write_zip_entry: Remove second reset of size variable to zero.Stefan Beller, May 26, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.