Thread (22 messages) 22 messages, 2 authors, 2024-12-24

[PATCH fbtest 05/17] drawops: Use "y == 0" in draw_ellipse_points()

flat view
STALE657d

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2024-12-15 10:53:10
Subsystem: the rest · Maintainer: Linus Torvalds

Replace the rare "0 == y" check by the more common "y == 0" check.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 drawops/generic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drawops/generic.c b/drawops/generic.c
index 9fd8aafb69a868a2..ba8154b7ee34ca18 100644
--- a/drawops/generic.c
+++ b/drawops/generic.c
@@ -281,7 +281,7 @@ static void draw_ellipse_points(u32 cx, u32 cy, u32 x, u32 y, pixel_t pixel)
     if (x == 0) {
 	set_pixel(cx, cy-y, pixel);
 	set_pixel(cx, cy+y, pixel);
-    } else if (0 == y) {
+    } else if (y == 0) {
 	set_pixel(cx-x, cy, pixel);
 	set_pixel(cx+x, cy, pixel);
     } else {
-- 
2.34.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help