From 336900061b500618df3b160ac88209a6450352dc Mon Sep 17 00:00:00 2001 From: yangxx Date: Thu, 7 Aug 2003 14:39:03 +0000 Subject: [PATCH] git-svn-id: http://ltt.polymtl.ca/svn@172 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/include/ltt/type.h | 4 ++-- ltt/branches/poly/ltt/type.c | 14 ++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/ltt/branches/poly/include/ltt/type.h b/ltt/branches/poly/include/ltt/type.h index d62871bb..3e567975 100644 --- a/ltt/branches/poly/include/ltt/type.h +++ b/ltt/branches/poly/include/ltt/type.h @@ -24,9 +24,9 @@ char *ltt_eventtype_description(LttEventType *et); LttFacility *ltt_eventtype_facility(LttEventType *et); -unsigned *ltt_eventtype_relative_id(LttEventType *et); +unsigned ltt_eventtype_relative_id(LttEventType *et); -unsigned *ltt_eventtype_id(LttEventType *et); +unsigned ltt_eventtype_id(LttEventType *et); LttType *ltt_eventtype_type(LttEventType *et); diff --git a/ltt/branches/poly/ltt/type.c b/ltt/branches/poly/ltt/type.c index 21636c24..1f21f2c9 100644 --- a/ltt/branches/poly/ltt/type.c +++ b/ltt/branches/poly/ltt/type.c @@ -60,12 +60,12 @@ LttFacility *ltt_eventtype_facility(LttEventType *et) *Input params * et : an event type *Return value - * unsigned * : the relative id + * unsigned : the relative id ****************************************************************************/ -unsigned *ltt_eventtype_relative_id(LttEventType *et) +unsigned ltt_eventtype_relative_id(LttEventType *et) { - return (unsigned*)&et->index; + return et->index; } /***************************************************************************** @@ -74,14 +74,12 @@ unsigned *ltt_eventtype_relative_id(LttEventType *et) *Input params * et : an event type *Return value - * unsigned * : the id + * unsigned : the id ****************************************************************************/ -unsigned *ltt_eventtype_id(LttEventType *et) +unsigned ltt_eventtype_id(LttEventType *et) { - unsigned *id = g_new(unsigned,1); - *id = et->facility->base_id + et->index; - return (unsigned*)id; + return et->facility->base_id + et->index; } /***************************************************************************** -- 2.34.1