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>
Shawn Pearce committed
Oct 30, 2006 at 17:34 UTC
861ed12106d7f8e65b90c8a5ed4a026cd71a044d
1 file changed
+2
-5
receive-pack.c
+2
-5
@@ -273,11 +273,10 @@ static void read_head_info(void)
273
}
274
}
275
276
-static const char *unpack(int *error_code)
276
+static const char *unpack(void)
277
{
278
int code = run_command_v_opt(1, unpacker, RUN_GIT_CMD);
279
280
- *error_code = 0;
280
switch (code) {
281
case 0:
282
return NULL;
@@ -294,7 +293,6 @@ static const char *unpack(int *error_code)
293
case -ERR_RUN_COMMAND_WAITPID_NOEXIT:
294
return "unpacker died strangely";
295
default:
297
- *error_code = -code;
296
return "unpacker exited with error code";
297
}
298
}
@@ -345,8 +343,7 @@ int main(int argc, char **argv)
343
344
read_head_info();
345
if (commands) {
348
- int code;
349
- const char *unpack_status = unpack(&code);
346
+ const char *unpack_status = unpack();
347
if (!unpack_status)
348
execute_commands();
349
if (report_status)