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:
parent
b39b37c0ae
commit
23e7b5a6b0
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue