summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUli Schlachter <psychon@znc.in>2013-11-16 19:05:35 +0100
committerUli Schlachter <psychon@znc.in>2013-11-16 19:05:35 +0100
commit31eff5c6eb57ad379689748fd8c60a5ffe0ba481 (patch)
treed0b809f4ddd700e9ba0f675258d1dee170566354
parent8c73949e44d4201fafc899693964c934f7072fa6 (diff)
Correct usage of CAIRO_STACK_ARRAY_LENGTH
This macro wants the array type as its argument and calls sizeof() on it internally. Signed-off-by: Uli Schlachter <psychon@znc.in>
-rw-r--r--src/cairo-xcb-surface-render.c2
-rw-r--r--src/cairo-xlib-render-compositor.c2
-rw-r--r--src/cairo-xlib-surface-shm.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/cairo-xcb-surface-render.c b/src/cairo-xcb-surface-render.c
index 99efe87..9625953 100644
--- a/src/cairo-xcb-surface-render.c
+++ b/src/cairo-xcb-surface-render.c
@@ -1350,7 +1350,7 @@ _render_fill_boxes (void *abstract_dst,
cairo_boxes_t *boxes)
{
cairo_xcb_surface_t *dst = abstract_dst;
- xcb_rectangle_t stack_xrects[CAIRO_STACK_ARRAY_LENGTH (sizeof (xcb_rectangle_t))];
+ xcb_rectangle_t stack_xrects[CAIRO_STACK_ARRAY_LENGTH (xcb_rectangle_t)];
xcb_rectangle_t *xrects = stack_xrects;
xcb_render_color_t render_color;
int render_op = _render_operator (op);
diff --git a/src/cairo-xlib-render-compositor.c b/src/cairo-xlib-render-compositor.c
index 68e7ce5..e90df09 100644
--- a/src/cairo-xlib-render-compositor.c
+++ b/src/cairo-xlib-render-compositor.c
@@ -100,7 +100,7 @@ set_clip_region (void *_surface,
_cairo_xlib_surface_ensure_picture (surface);
if (region != NULL) {
- XRectangle stack_rects[CAIRO_STACK_ARRAY_LENGTH (sizeof (XRectangle))];
+ XRectangle stack_rects[CAIRO_STACK_ARRAY_LENGTH (XRectangle)];
XRectangle *rects = stack_rects;
int n_rects, i;
diff --git a/src/cairo-xlib-surface-shm.c b/src/cairo-xlib-surface-shm.c
index fa7d3eb..84b46d8 100644
--- a/src/cairo-xlib-surface-shm.c
+++ b/src/cairo-xlib-surface-shm.c
@@ -893,7 +893,7 @@ _cairo_xlib_surface_update_shm (cairo_xlib_surface_t *surface)
}
if (damage->region) {
- XRectangle stack_rects[CAIRO_STACK_ARRAY_LENGTH (sizeof (XRectangle))];
+ XRectangle stack_rects[CAIRO_STACK_ARRAY_LENGTH (XRectangle)];
XRectangle *rects = stack_rects;
cairo_rectangle_int_t r;
int n_rects, i;
@@ -1081,7 +1081,7 @@ _cairo_xlib_surface_put_shm (cairo_xlib_surface_t *surface)
TRACE ((stderr, "%s: flushing damage x %d\n", __FUNCTION__,
damage->region ? cairo_region_num_rectangles (damage->region) : 0));
if (damage->status == CAIRO_STATUS_SUCCESS && damage->region) {
- XRectangle stack_rects[CAIRO_STACK_ARRAY_LENGTH (sizeof (XRectangle))];
+ XRectangle stack_rects[CAIRO_STACK_ARRAY_LENGTH (XRectangle)];
XRectangle *rects = stack_rects;
cairo_rectangle_int_t r;
int n_rects, i;