From 97a00bdd4eefade8d0808b5572bcdbba26c9c8f3 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 17 Dec 2008 17:32:07 +0000 Subject: [PATCH] [cairoint.h] Wrap macro in parenthesis Ensure that the stride calculation macro is not influenced by surrounding precedence issues by enclosing it in a pair of parenthesis. --- src/cairoint.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cairoint.h b/src/cairoint.h index 819d534bd..21c5d6286 100644 --- a/src/cairoint.h +++ b/src/cairoint.h @@ -2067,7 +2067,7 @@ _cairo_surface_has_device_transform (cairo_surface_t *surface); /* pixman-required stride alignment in bytes. */ #define CAIRO_STRIDE_ALIGNMENT (sizeof (uint32_t)) #define CAIRO_STRIDE_FOR_WIDTH_BPP(w,bpp) \ - (((bpp)*(w)+7)/8 + CAIRO_STRIDE_ALIGNMENT-1) & ~(CAIRO_STRIDE_ALIGNMENT-1) + ((((bpp)*(w)+7)/8 + CAIRO_STRIDE_ALIGNMENT-1) & -CAIRO_STRIDE_ALIGNMENT) #define CAIRO_CONTENT_VALID(content) ((content) && \ (((content) & ~(CAIRO_CONTENT_COLOR | \