]> git.neil.brown.name Git - wiggle.git/commitdiff
vpatch: fix build warning
authorNeilBrown <neil@brown.name>
Thu, 28 Sep 2017 12:25:15 +0000 (22:25 +1000)
committerNeilBrown <neil@brown.name>
Thu, 28 Sep 2017 12:25:15 +0000 (22:25 +1000)
This condition was a bit convoluted and while it was correct,
it doesn't look it.

Move the '!' into the '==' so the intention is a bit clearer
and compiler doesn't complain.

Fixes #7

Signed-off-by: NeilBrown <neil@brown.name>
vpatch.c

index 5aa143c329326e028a44dc19654f6588cba566bd..2c574c8981fda01a5fe4d1a3d37da9ff0bf9a794 100644 (file)
--- a/vpatch.c
+++ b/vpatch.c
@@ -2068,8 +2068,8 @@ static int merge_window(struct plist *p, FILE *f, int reverse, int replace,
                        do {
                                pos = tpos; row++;
                                next_mline(&tpos, fm, fb, fa, ci.merger, mmode);
-                       } while (!(check_line(pos, fm, fb, fa, ci.merger, mmode)
-                                  & CONFLICTED) == 0
+                       } while ((check_line(pos, fm, fb, fa, ci.merger, mmode)
+                                 & CONFLICTED) != 0
                                 && ci.merger[tpos.p.m].type != End);
                        tpos = pos; row--;
                        do {