From ba51acb1de752924c389cedbca39b5dc63679ee6 Mon Sep 17 00:00:00 2001 From: Povilas Kanapickas Date: Thu, 25 Mar 2021 22:57:56 +0200 Subject: [PATCH] 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 --- miext/rootless/rootlessGC.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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);