diff options
author | Jeff Muizelaar <jmuizelaar@mozilla.com> | 2010-05-10 15:06:25 -0400 |
---|---|---|
committer | Jeff Muizelaar <jmuizelaar@mozilla.com> | 2010-05-10 15:06:25 -0400 |
commit | ee446910aa1db0ca0b54791a2ef3bb24b277c9a4 (patch) | |
tree | 7a3982c8872d10db2f522feec15fbf5ce41541dc | |
parent | e540d040bddc717f17e0e2510cffc0bc3cb41ccd (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.h | 2 |
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 |