[Pixman] [PATCH 5/5] demos: Consistently use G_N_ELEMENTS()

Andrea Canciani ranma42 at gmail.com
Fri Nov 4 05:23:29 PDT 2011


Instead of open-coding G_N_ELEMENTS(), just use it.
---
 demos/composite-test.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/demos/composite-test.c b/demos/composite-test.c
index f5f352f..bba90c5 100644
--- a/demos/composite-test.c
+++ b/demos/composite-test.c
@@ -123,7 +123,7 @@ main (int argc, char **argv)
     table = gtk_table_new (G_N_ELEMENTS (operators) / 6, 6, TRUE);
 
     src_img = pixman_image_create_linear_gradient (&p1, &p2, stops,
-						   sizeof (stops) / sizeof (stops[0]));
+						   G_N_ELEMENTS (stops));
 
     pixman_image_set_repeat (src_img, PIXMAN_REPEAT_PAD);
     
-- 
1.7.5.4



More information about the Pixman mailing list