libXmu/0001-ShapeEllipseOrRoundedRectangle-Check-height-AND-widt.patch
2018-08-14 10:08:13 +02:00

34 lines
985 B
Diff

From 22d9c590901e121936f50dee97dc60c4f7defb63 Mon Sep 17 00:00:00 2001
From: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Mon, 2 Dec 2013 13:00:05 -0800
Subject: [PATCH] ShapeEllipseOrRoundedRectangle: Check height AND width, not
width twice
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@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;
--
2.17.1