summaryrefslogtreecommitdiff
path: root/test/bug-spline.c
diff options
context:
space:
mode:
authorBryce Harrington <bryce@osg.samsung.com>2014-11-14 18:10:16 -0800
committerBryce Harrington <bryce@osg.samsung.com>2014-11-20 12:22:06 -0800
commit7edc5a8844b96862b866901568eb83fa56f4755b (patch)
tree61eda7ee6d679b260c54fab84ff1d15621a1971c /test/bug-spline.c
parentae608035c7b7133826a608d45e067c3875a1aceb (diff)
downloadcairo-7edc5a8844b96862b866901568eb83fa56f4755b.tar.gz
test: Use ARRAY_LENGTH macro
Diffstat (limited to 'test/bug-spline.c')
-rw-r--r--test/bug-spline.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/bug-spline.c b/test/bug-spline.c
index 00a915cd3..9a54a7c8c 100644
--- a/test/bug-spline.c
+++ b/test/bug-spline.c
@@ -56,7 +56,6 @@ static const struct spline {
{ 1, 0, 0, 1 },
}
};
-#define NUM_SPLINES (sizeof(splines)/sizeof(splines[0]))
static cairo_test_status_t
draw (cairo_t *cr, int width, int height)
@@ -68,7 +67,7 @@ draw (cairo_t *cr, int width, int height)
cairo_set_line_cap(cr, CAIRO_LINE_CAP_SQUARE);
- for (n = 0; n < NUM_SPLINES; n++) {
+ for (n = 0; n < ARRAY_LENGTH(splines); n++) {
cairo_set_line_width (cr, splines[n].line_width);
cairo_set_source_rgba (cr,
splines[n].rgba[0],