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

Konstantin Kharlamov Hi-Angel at yandex.ru
Sat Mar 23 23:51:57 UTC 2019


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 at yandex.ru>
---
 Xext/xtest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
             }
         }
-- 
2.21.0



More information about the xorg-devel mailing list