Add parentheses to trace_do_casts macro.

The arguments to this macro didn't have parentheses around them where
they were used.  If a call to a TRACE macro included an expression as
an argument, the cast to (unsigned long) could bind to just part of
the expression and lead to unexpected results.

Signed-off-by: Michael Vrable <mvrable@cs.ucsd.edu>
This commit is contained in:
kaf24@firebug.cl.cam.ac.uk committed 2007-03-19 09:32:52 +00:00
1 parent ca039d0244
commit 569b0bb3b9
1 file changed
+5 -5
+5 -5
View File
@@ -41,11 +41,11 @@ void trace(u32 event, unsigned long d1, unsigned long d2,
do { \
if ( unlikely(tb_init_done) ) \
trace(e, \
(unsigned long)d1, \
(unsigned long)d2, \
(unsigned long)d3, \
(unsigned long)d4, \
(unsigned long)d5); \
(unsigned long)(d1), \
(unsigned long)(d2), \
(unsigned long)(d3), \
(unsigned long)(d4), \
(unsigned long)(d5)); \
} while ( 0 )
/* Convenience macros for calling the trace function. */
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.