[3/9] Xext: the check firstValuator ≤ 1 is duplicated in this branch

Submitted by Konstantin Kharlamov on March 23, 2019, 11:51 p.m.

Details

Message ID 20190323235203.30143-4-Hi-Angel@yandex.ru
State New
Headers show
Series "Fix some of LGTM warnings" ( rev: 2 1 ) in X.org

Not browsing as part of any series.

Commit Message

Konstantin Kharlamov March 23, 2019, 11:51 p.m.
Correctness is ensured be checking md5sum result before and after the
commit (it's the same).

Fixes LGTM warning: "Comparison is always true because firstValuator <= 1."

Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
---
 Xext/xtest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/Xext/xtest.c b/Xext/xtest.c
index 38b80122b..358a42fa5 100644
--- a/Xext/xtest.c
+++ b/Xext/xtest.c
@@ -381,7 +381,7 @@  ProcXTestFakeInput(ClientPtr client)
             if ((flags & POINTER_ABSOLUTE) && firstValuator <= 1 && numValuators > 0) {
                 if (firstValuator == 0)
                     valuators[0] += root->drawable.pScreen->x;
-                if (firstValuator < 2 && firstValuator + numValuators > 1)
+                if (firstValuator + numValuators > 1)
                     valuators[1 - firstValuator] += root->drawable.pScreen->y;
             }
         }