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@xxxxxxxxxxx> --- 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 - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html