Commit 23e7b5a6 authored by Frédéric Delanoy's avatar Frédéric Delanoy Committed by Alexandre Julliard

cmd: Simplify boolean expressions (PVS-Studio).

parent b39b37c0
......@@ -1005,7 +1005,7 @@ void WCMD_copy(WCHAR * args) {
if (!srcisdevice) FindClose (hff);
} else {
/* Error if the first file was not found */
if (!anyconcats || (anyconcats && !writtenoneconcat)) {
if (!anyconcats || !writtenoneconcat) {
WCMD_print_error ();
errorlevel = 1;
}
......
......@@ -879,7 +879,7 @@ static void handleExpansion(WCHAR *cmd, BOOL atExecute, BOOL delayed) {
if (startchar == '%' && forvaridx != -1 && forloopcontext.variable[forvaridx]) {
/* Replace the 2 characters, % and for variable character */
WCMD_strsubstW(p, p + 2, forloopcontext.variable[forvaridx], -1);
} else if (!atExecute || (atExecute && startchar == '!')) {
} else if (!atExecute || startchar == '!') {
p = WCMD_expand_envvar(p, startchar);
/* In a FOR loop, see if this is the variable to replace */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment