summaryrefslogtreecommitdiff
path: root/src/cairo-xlib-surface-shm.c
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 /src/cairo-xlib-surface-shm.c
parent8c73949e44d4201fafc899693964c934f7072fa6 (diff)
downloadcairo-31eff5c6eb57ad379689748fd8c60a5ffe0ba481.tar.gz
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>
Diffstat (limited to 'src/cairo-xlib-surface-shm.c')
-rw-r--r--src/cairo-xlib-surface-shm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cairo-xlib-surface-shm.c b/src/cairo-xlib-surface-shm.c
index fa7d3eb9b..84b46d89a 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;