qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Harsh Prateek Bora <harsh@linux.vnet.ibm.com>
To: stefanha@gmail.com, qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com
Cc: Harsh Prateek Bora <harsh@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH 2/4] trace/simple.c: remove unnecessary typecasting
Date: Fri, 20 Jul 2012 18:52:13 +0530	[thread overview]
Message-ID: <1342790535-11444-3-git-send-email-harsh@linux.vnet.ibm.com> (raw)
In-Reply-To: <1342790535-11444-1-git-send-email-harsh@linux.vnet.ibm.com>


Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com>
---
 trace/simple.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/trace/simple.c b/trace/simple.c
index 5d92939..a0e0f05 100644
--- a/trace/simple.c
+++ b/trace/simple.c
@@ -235,9 +235,9 @@ int trace_record_start(TraceBufferRecord *rec, TraceEventID event, size_t datasi
     rec->next_tbuf_idx = new_idx % TRACE_BUF_LEN;
 
     rec_off = idx;
-    rec_off = write_to_buffer(rec_off, (uint8_t*)&event, sizeof(event));
-    rec_off = write_to_buffer(rec_off, (uint8_t*)&timestamp_ns, sizeof(timestamp_ns));
-    rec_off = write_to_buffer(rec_off, (uint8_t*)&rec_len, sizeof(rec_len));
+    rec_off = write_to_buffer(rec_off, &event, sizeof(event));
+    rec_off = write_to_buffer(rec_off, &timestamp_ns, sizeof(timestamp_ns));
+    rec_off = write_to_buffer(rec_off, &rec_len, sizeof(rec_len));
 
     rec->tbuf_idx = idx;
     rec->rec_off  = (idx + sizeof(TraceRecord)) % TRACE_BUF_LEN;
-- 
1.7.10.4

  parent reply	other threads:[~2012-07-20 13:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-20 13:22 [Qemu-devel] [PATCH 0/4] Simpletrace v2: Code cleanup, refactoring Harsh Prateek Bora
2012-07-20 13:22 ` [Qemu-devel] [PATCH 1/4] trace/simple.c: rename TraceRecordHeader to TraceLogHeader as appropriate Harsh Prateek Bora
2012-07-20 13:22 ` Harsh Prateek Bora [this message]
2012-07-20 13:22 ` [Qemu-devel] [PATCH 3/4] trace/simple.c: remove obsolete code Harsh Prateek Bora
2012-07-20 13:22 ` [Qemu-devel] [PATCH 4/4] trace/simple.c: minor code refactoring Harsh Prateek Bora
2012-07-30 12:56 ` [Qemu-devel] [PATCH 0/4] Simpletrace v2: Code cleanup, refactoring Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1342790535-11444-3-git-send-email-harsh@linux.vnet.ibm.com \
    --to=harsh@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=stefanha@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).