From 38e31695cfa631ee45d73c0ae3db10f3585692cf Mon Sep 17 00:00:00 2001 From: Thomas Klausner Date: Fri, 28 Jun 2013 15:29:45 +0200 Subject: [PATCH 3/3] Remove comparisons that cannot be true. The variables compared here are all CARD32, which is an unsigned type. --- src/via_xv_overlay.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/via_xv_overlay.c b/src/via_xv_overlay.c index bdcd383..85b2403 100644 --- a/src/via_xv_overlay.c +++ b/src/via_xv_overlay.c @@ -1759,24 +1759,16 @@ SetVideoWindow(ScrnInfoPtr pScrn, unsigned long videoFlag, } }*/ - if (top < 0) - top = 0; - else if (top > 2047) + if (top > 2047) top = 2047; - if (bottom < 0) - bottom = 0; - else if (bottom > 2047) + if (bottom > 2047) bottom = 2047; - if (left < 0) - left = 0; - else if (left > 2047) + if (left > 2047) left = 2047; - if (right < 0) - right = 0; - else if (right > 2047) + if (right > 2047) right = 2047; if (videoFlag & VIDEO_1_INUSE) { -- 1.8.3.1