* [PATCH] Remove unused variable in receive-pack.
@ 2006-10-30 22:34 Shawn Pearce
0 siblings, 0 replies; only message in thread
From: Shawn Pearce @ 2006-10-30 22:34 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
We aren't using this return code variable for anything so lets
just get rid of it to keep this section of code clean.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
receive-pack.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/receive-pack.c b/receive-pack.c
index 7e4e510..f6f1729 100644
--- a/receive-pack.c
+++ b/receive-pack.c
@@ -219,7 +219,7 @@ static void read_head_info(void)
}
}
-static const char *unpack(int *error_code)
+static const char *unpack()
{
int code;
@@ -230,7 +230,6 @@ static const char *unpack(int *error_cod
code = run_command_v_opt(ARRAY_SIZE(unpacker) - 1,
unpacker, RUN_GIT_CMD);
- *error_code = 0;
switch (code) {
case 0:
return NULL;
@@ -247,7 +246,6 @@ static const char *unpack(int *error_cod
case -ERR_RUN_COMMAND_WAITPID_NOEXIT:
return "unpacker died strangely";
default:
- *error_code = -code;
return "unpacker exited with error code";
}
}
@@ -301,8 +299,7 @@ int main(int argc, char **argv)
read_head_info();
if (commands) {
- int code;
- const char *unpack_status = unpack(&code);
+ const char *unpack_status = unpack();
if (!unpack_status)
execute_commands();
if (report_status)
--
1.4.3.3.g7d63
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-10-30 22:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-30 22:34 [PATCH] Remove unused variable in receive-pack Shawn Pearce
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).