From: Jonathan Nieder Date: Wed, 16 Mar 2011 11:36:52 GMT Subject: [PATCH 2/6] run-command: initialize failed_errno to 0 Message-ID: <20110316113652.GD15739@elie> In-Reply-To: <20110316113540.GB15739@elie> It is much better to report "Success" than a seemingly random error message based on an uninitialized value. Signed-off-by: Jonathan Nieder --- run-command.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/run-command.c b/run-command.c index f4fb936..8bb4d62 100644 --- a/run-command.c +++ b/run-command.c @@ -139,7 +139,7 @@ int start_command(struct child_process *cmd) { int need_in, need_out, need_err; int fdin[2], fdout[2], fderr[2]; - int failed_errno; + int failed_errno = 0; /* * In case of errors we must keep the promise to close FDs -- 1.7.4.1