[PATCH] cmd: break out of the argument scan loop (Coverity)
Marcus Meissner
marcus at jet.franken.de
Fri Dec 4 03:06:13 CST 2009
Hi,
Coverity thinks that the code after the large while() loop
is dead... Which it probably is.
But lets just break out of the loop in the "file not found"
error case to make it more clear.
Ciao, Marcus
---
programs/cmd/wcmdmain.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index 9f5b6df..fed1fbd 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
{
--
1.5.6
More information about the wine-patches
mailing list