Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn Pearce <spearce@spearce.org>2006-10-31 01:34:50 +0300
committerJunio C Hamano <junkio@cox.net>2006-10-31 06:12:29 +0300
commit861ed12106d7f8e65b90c8a5ed4a026cd71a044d (patch)
tree2c288c8fde1d6ceddfa45c9e701eeb4b295933f5 /receive-pack.c
parentb8077709243138c3d8cc1c096c06a95b250a9001 (diff)
Remove unused variable in receive-pack.
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> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'receive-pack.c')
-rw-r--r--receive-pack.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/receive-pack.c b/receive-pack.c
index ea2dbd4e33..675b1c18a3 100644
--- a/receive-pack.c
+++ b/receive-pack.c
@@ -273,11 +273,10 @@ static void read_head_info(void)
}
}
-static const char *unpack(int *error_code)
+static const char *unpack(void)
{
int code = run_command_v_opt(1, unpacker, RUN_GIT_CMD);
- *error_code = 0;
switch (code) {
case 0:
return NULL;
@@ -294,7 +293,6 @@ static const char *unpack(int *error_code)
case -ERR_RUN_COMMAND_WAITPID_NOEXIT:
return "unpacker died strangely";
default:
- *error_code = -code;
return "unpacker exited with error code";
}
}
@@ -345,8 +343,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)