{"thread":{"id":"43503","subject":"[PATCH] Remove unused variable in receive-pack.","startedAt":"2006-10-30T22:34:50Z","lastAt":"2006-10-30T22:34:50Z","messageCount":1,"participants":["Shawn Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"295156","messageId":"20061030223450.GE5775@spearce.org","threadId":"43503","inReplyTo":null,"subject":"[PATCH] Remove unused variable in receive-pack.","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2006-10-30T22:34:50Z","receivedAt":"2006-10-30T22:34:50Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"We aren't using this return code variable for anything so lets\njust get rid of it to keep this section of code clean.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n receive-pack.c |    7 ++-----\n 1 files changed, 2 insertions(+), 5 deletions(-)\n\ndiff --git a/receive-pack.c b/receive-pack.c\nindex 7e4e510..f6f1729 100644\n--- a/receive-pack.c\n+++ b/receive-pack.c\n@@ -219,7 +219,7 @@ static void read_head_info(void)\n \t}\n }\n \n-static const char *unpack(int *error_code)\n+static const char *unpack()\n {\n \tint code;\n \n@@ -230,7 +230,6 @@ static const char *unpack(int *error_cod\n \t\tcode = run_command_v_opt(ARRAY_SIZE(unpacker) - 1,\n \t\t\t\t\t unpacker, RUN_GIT_CMD);\n \n-\t*error_code = 0;\n \tswitch (code) {\n \tcase 0:\n \t\treturn NULL;\n@@ -247,7 +246,6 @@ static const char *unpack(int *error_cod\n \tcase -ERR_RUN_COMMAND_WAITPID_NOEXIT:\n \t\treturn \"unpacker died strangely\";\n \tdefault:\n-\t\t*error_code = -code;\n \t\treturn \"unpacker exited with error code\";\n \t}\n }\n@@ -301,8 +299,7 @@ int main(int argc, char **argv)\n \n \tread_head_info();\n \tif (commands) {\n-\t\tint code;\n-\t\tconst char *unpack_status = unpack(&code);\n+\t\tconst char *unpack_status = unpack();\n \t\tif (!unpack_status)\n \t\t\texecute_commands();\n \t\tif (report_status)\n-- \n1.4.3.3.g7d63\n"}]}