Remove unused variable in receive-pack.
PATCH 1/1 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 <[email protected]>
--- receive-pack.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-)
receive-pack.c +2 -5
@@ -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_codcase -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)
Signature · 1 line
1.4.3.3.g7d63