WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Add parentheses to trace_do_casts macro.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Add parentheses to trace_do_casts macro.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 20 Mar 2007 09:50:14 -0700
Delivery-date: Tue, 20 Mar 2007 09:49:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Date 1174296772 0
# Node ID b795b90e4ff6ad9ce0c9fc47d921f91a4fb12cc5
# Parent  548e61fbdc1a0a04d2e494f2ef36b71201c18b4b
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@xxxxxxxxxxx>
---
 xen/include/xen/trace.h |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff -r 548e61fbdc1a -r b795b90e4ff6 xen/include/xen/trace.h
--- a/xen/include/xen/trace.h   Mon Mar 19 09:31:04 2007 +0000
+++ b/xen/include/xen/trace.h   Mon Mar 19 09:32:52 2007 +0000
@@ -41,11 +41,11 @@ void trace(u32 event, unsigned long d1, 
     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. */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Add parentheses to trace_do_casts macro., Xen patchbot-unstable <=