From: NeilBrown Date: Thu, 28 Sep 2017 12:25:15 +0000 (+1000) Subject: vpatch: fix build warning X-Git-Tag: v1.1~2 X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=10c53ed50f3bf17ff54a5bc55674e284ea934462;p=wiggle.git vpatch: fix build warning 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 --- diff --git a/vpatch.c b/vpatch.c index 5aa143c..2c574c8 100644 --- 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 {