demos: Consistently use G_N_ELEMENTS()
authorAndrea Canciani <ranma42@gmail.com>
Thu, 3 Nov 2011 10:07:25 +0000 (11:07 +0100)
committerAndrea Canciani <ranma42@gmail.com>
Wed, 9 Nov 2011 08:17:00 +0000 (09:17 +0100)
Instead of open-coding G_N_ELEMENTS(), just use it.

demos/composite-test.c

index f5f352f..bba90c5 100644 (file)
@@ -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);