xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Mar 26 09:07:12 UTC 2021


 miext/rootless/rootlessGC.c |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

New commits:
commit ba51acb1de752924c389cedbca39b5dc63679ee6
Author: Povilas Kanapickas <povilas at radix.lt>
Date:   Thu Mar 25 22:57:56 2021 +0200

    miext: Remove if check which is always true
    
    In both cases we check for width > 0 just above, and the variable is not
    modified between the checks, so the condition is always true.
    
    Signed-off-by: Povilas Kanapickas <povilas at radix.lt>

diff --git a/miext/rootless/rootlessGC.c b/miext/rootless/rootlessGC.c
index 235b3ab7c..52d9df9ce 100644
--- a/miext/rootless/rootlessGC.c
+++ b/miext/rootless/rootlessGC.c
@@ -1243,10 +1243,7 @@ RootlessPolyText8(DrawablePtr dst, GCPtr pGC,
         box.x2 = dst->x + x + FONTMAXBOUNDS(pGC->font, rightSideBearing);
 
         if (count > 1) {
-            if (width > 0)
-                box.x2 += width;
-            else
-                box.x1 += width;
+            box.x2 += width;
         }
 
         box.y1 = dst->y + y - FONTMAXBOUNDS(pGC->font, ascent);
@@ -1334,10 +1331,7 @@ RootlessPolyText16(DrawablePtr dst, GCPtr pGC,
         box.x2 = dst->x + x + FONTMAXBOUNDS(pGC->font, rightSideBearing);
 
         if (count > 1) {
-            if (width > 0)
-                box.x2 += width;
-            else
-                box.x1 += width;
+            box.x2 += width;
         }
 
         box.y1 = dst->y + y - FONTMAXBOUNDS(pGC->font, ascent);


More information about the xorg-commit mailing list