ia64/xen-unstable

changeset 14462:b795b90e4ff6

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>
author kaf24@firebug.cl.cam.ac.uk
date Mon Mar 19 09:32:52 2007 +0000 (2007-03-19)
parents 548e61fbdc1a
children f40079acf646
files xen/include/xen/trace.h
line diff
     1.1 --- a/xen/include/xen/trace.h	Mon Mar 19 09:31:04 2007 +0000
     1.2 +++ b/xen/include/xen/trace.h	Mon Mar 19 09:32:52 2007 +0000
     1.3 @@ -41,11 +41,11 @@ void trace(u32 event, unsigned long d1, 
     1.4      do {                                 \
     1.5          if ( unlikely(tb_init_done) )    \
     1.6              trace(e,                     \
     1.7 -                 (unsigned long)d1,      \
     1.8 -                 (unsigned long)d2,      \
     1.9 -                 (unsigned long)d3,      \
    1.10 -                 (unsigned long)d4,      \
    1.11 -                 (unsigned long)d5);     \
    1.12 +                  (unsigned long)(d1),   \
    1.13 +                  (unsigned long)(d2),   \
    1.14 +                  (unsigned long)(d3),   \
    1.15 +                  (unsigned long)(d4),   \
    1.16 +                  (unsigned long)(d5));  \
    1.17      } while ( 0 )
    1.18  
    1.19  /* Convenience macros for calling the trace function. */