From f62218fc66016079b5455e0a7f6c161b8c2b6a2c Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Fri, 4 Dec 2009 10:06:13 +0100 Subject: [PATCH] cmd: Break out of the argument scan loop (Coverity). --- programs/cmd/wcmdmain.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 9f5b6df3576..fed1fbd3c59 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -1153,13 +1153,10 @@ void WCMD_run_program (WCHAR *command, int called) { WCMD_run_program(command, called); return; } - if (!status) { - WCMD_print_error (); - /* If a command fails to launch, it sets errorlevel 9009 - which - does not seem to have any associated constant definition */ - errorlevel = 9009; - return; - } + + if (!status) + break; + if (!assumeInternal && !console) errorlevel = 0; else { -- 2.11.4.GIT