summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Muizelaar <jmuizelaar@mozilla.com>2010-05-10 15:06:25 -0400
committerJeff Muizelaar <jmuizelaar@mozilla.com>2010-05-10 15:06:25 -0400
commitee446910aa1db0ca0b54791a2ef3bb24b277c9a4 (patch)
tree7a3982c8872d10db2f522feec15fbf5ce41541dc
parente540d040bddc717f17e0e2510cffc0bc3cb41ccd (diff)
Add an additional set parantheses around the container_of macro
The non-__GNUC__ version of the container_of macro would do wrong when used like container_of(...)-> because '->' binds tighter than the cast in the container_of macro. Adding an additional set of parantheses fixes this.
-rw-r--r--src/cairoint.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cairoint.h b/src/cairoint.h
index 490dfed0..805c5744 100644
--- a/src/cairoint.h
+++ b/src/cairoint.h
@@ -132,7 +132,7 @@ _cairo_win32_tmpfile (void);
})
#else
#define cairo_container_of(ptr, type, member) \
- (type *)((char *) (ptr) - (char *) &((type *)0)->member)
+ ((type *)((char *) (ptr) - (char *) &((type *)0)->member))
#endif