cmd: Simplify boolean expressions (PVS-Studio).

Signed-off-by: Frédéric Delanoy <frederic.delanoy@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Frédéric Delanoy 2015-10-14 01:58:38 +02:00 committed by Alexandre Julliard
parent b39b37c0ae
commit 23e7b5a6b0
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -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 */