[PATCH:libXmu] ShapeEllipseOrRoundedRectangle: Check height AND width, not width twice

Alan Coopersmith alan.coopersmith at oracle.com
Mon Dec 2 13:03:50 PST 2013


Fixed to match check in ShapeOval()
https://bugs.freedesktop.org/show_bug.cgi?id=72245

Fixes cppcheck warning:
[ShapeWidg.c:204]: (style) Same expression on both sides of '||'.

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 src/ShapeWidg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ShapeWidg.c b/src/ShapeWidg.c
index 32388ee..3ca7116 100644
--- a/src/ShapeWidg.c
+++ b/src/ShapeWidg.c
@@ -201,7 +201,7 @@ ShapeEllipseOrRoundedRectangle(Widget w, Bool ellipse, int ew, int eh)
     GC gc;
   unsigned long mask;
 
-  if (width < 3 || width < 3)
+  if (width < 3 || height < 3)
     return;
   width += w->core.border_width << 1;
   height += w->core.border_width << 1;
-- 
1.7.9.2



More information about the xorg-devel mailing list