[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xentrace: Remove unneeded cast when assigning pointer value to dst



# HG changeset patch
# User Olaf Hering <olaf@xxxxxxxxx>
# Date 1304931590 -3600
# Node ID b7ca55907bd33473009f941aa4661e709e649e49
# Parent  0ddcc8063690b256fbc483785f4793a658b671d9
xentrace: Remove unneeded cast when assigning pointer value to dst

Remove unneeded cast when assigning pointer value to dst.
Both arrays are uint32_t and memcpy takes a void pointer.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
---


diff -r 0ddcc8063690 -r b7ca55907bd3 xen/common/trace.c
--- a/xen/common/trace.c        Mon May 09 09:59:13 2011 +0100
+++ b/xen/common/trace.c        Mon May 09 09:59:50 2011 +0100
@@ -483,7 +483,7 @@
                                    const void *extra_data)
 {
     struct t_rec *rec;
-    unsigned char *dst;
+    uint32_t *dst;
     unsigned int extra_word = extra / sizeof(u32);
     unsigned int local_rec_size = calc_rec_size(cycles, extra);
     uint32_t next;
@@ -508,13 +508,13 @@
 
     rec->event = event;
     rec->extra_u32 = extra_word;
-    dst = (unsigned char *)rec->u.nocycles.extra_u32;
+    dst = rec->u.nocycles.extra_u32;
     if ( (rec->cycles_included = cycles) != 0 )
     {
         u64 tsc = (u64)get_cycles();
         rec->u.cycles.cycles_lo = (uint32_t)tsc;
         rec->u.cycles.cycles_hi = (uint32_t)(tsc >> 32);
-        dst = (unsigned char *)rec->u.cycles.extra_u32;
+        dst = rec->u.cycles.extra_u32;
     } 
 
     if ( extra_data && extra )

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.