From 532d06c39985536e14ab09bb19c69d93341f4b64 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sat, 9 May 2020 16:07:30 +0100 Subject: [PATCH] Initialize return code in case something mysterious happens. --- cmd-run-shell.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd-run-shell.c b/cmd-run-shell.c index 82d4a1a2..3792aaae 100644 --- a/cmd-run-shell.c +++ b/cmd-run-shell.c @@ -190,7 +190,8 @@ cmd_run_shell_callback(struct job *job) retcode = WTERMSIG(status); xasprintf(&msg, "'%s' terminated by signal %d", cmd, retcode); retcode += 128; - } + } else + retcode = 0; if (msg != NULL) cmd_run_shell_print(job, msg); free(msg);