From 551bf4859ac2f9df1e737987b3b8d3f7ae870fca Mon Sep 17 00:00:00 2001 From: compudj Date: Wed, 18 Feb 2009 05:12:03 +0000 Subject: [PATCH] fix lttv event ID 29, 30, 31 handling git-svn-id: http://ltt.polymtl.ca/svn@3322 04897980-b3bd-0310-b5e0-8ef037075253 --- trunk/lttv/ltt/tracefile.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/trunk/lttv/ltt/tracefile.c b/trunk/lttv/ltt/tracefile.c index 81aed84f..680bcc46 100644 --- a/trunk/lttv/ltt/tracefile.c +++ b/trunk/lttv/ltt/tracefile.c @@ -1256,6 +1256,7 @@ int ltt_tracefile_read_update_event(LttTracefile *tf) void * pos; LttEvent *event; void *pos_aligned; + guint16 packed_evid; /* event id reader from the 5 bits in header */ event = &tf->event; pos = tf->buffer.head + event->offset; @@ -1267,11 +1268,11 @@ int ltt_tracefile_read_update_event(LttTracefile *tf) pos_aligned = pos; event->timestamp = ltt_get_uint32(LTT_GET_BO(tf), pos); - event->event_id = event->timestamp >> tf->tscbits; + event->event_id = packed_evid = event->timestamp >> tf->tscbits; event->timestamp = event->timestamp & tf->tsc_mask; pos += sizeof(guint32); - switch (event->event_id) { + switch (packed_evid) { case 29: /* LTT_RFLAG_ID_SIZE_TSC */ event->event_id = ltt_get_uint16(LTT_GET_BO(tf), pos); pos += sizeof(guint16); @@ -1305,7 +1306,7 @@ int ltt_tracefile_read_update_event(LttTracefile *tf) break; } - if (likely(event->event_id != 29)) { + if (likely(packed_evid != 29)) { /* No extended timestamp */ if (event->timestamp < (tf->buffer.tsc & tf->tsc_mask)) tf->buffer.tsc = ((tf->buffer.tsc & ~tf->tsc_mask) /* overflow */ -- 2.34.1