=?UTF-8?Q?Fr=C3=A9d=C3=A9ric=20Delanoy=20?=: cmd/tests: Simplify boolean expressions (PVS-Studio).

Alexandre Julliard julliard at wine.codeweavers.com
Wed Oct 14 11:12:50 CDT 2015


Module: wine
Branch: master
Commit: e6042cf6a64f12d2414b1e6be9df9687c2733b03
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e6042cf6a64f12d2414b1e6be9df9687c2733b03

Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date:   Wed Oct 14 01:58:39 2015 +0200

cmd/tests: Simplify boolean expressions (PVS-Studio).

Signed-off-by: Frédéric Delanoy <frederic.delanoy at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/cmd/tests/batch.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/programs/cmd/tests/batch.c b/programs/cmd/tests/batch.c
index 9df0bc5..c1847d6 100644
--- a/programs/cmd/tests/batch.c
+++ b/programs/cmd/tests/batch.c
@@ -320,13 +320,14 @@ static void test_output(const char *out_data, DWORD out_size, const char *exp_da
             /* If we rewind to the beginning of the line, don't increment line number */
             line--;
         }
-        else if (!is_exp_resync || (is_exp_resync && !err))
+        else if (!is_exp_resync || !err)
         {
             exp_ptr = exp_nl+1;
             if(exp_nl+1 < exp_data+exp_size && exp_nl[0] == '\r' && exp_nl[1] == '\n')
                 exp_ptr++;
         }
-        if (!is_out_resync || (is_out_resync && !err))
+
+        if (!is_out_resync || !err)
         {
             out_ptr = out_nl+1;
             if(out_nl+1 < out_data+out_size && out_nl[0] == '\r' && out_nl[1] == '\n')




More information about the wine-cvs mailing list