From: yangxx Date: Fri, 1 Aug 2003 18:59:09 +0000 (+0000) Subject: git-svn-id: http://ltt.polymtl.ca/svn@156 04897980-b3bd-0310-b5e0-8ef037075253 X-Git-Tag: v0.12.20~3333 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=c687f6c85e284b47600b61e20aa0737482a20ef4;p=lttv.git git-svn-id: ltt.polymtl.ca/svn@156 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/ltt/event.c b/ltt/branches/poly/ltt/event.c index c8a8ee20..100207b8 100644 --- a/ltt/branches/poly/ltt/event.c +++ b/ltt/branches/poly/ltt/event.c @@ -280,7 +280,7 @@ unsigned ltt_event_get_unsigned(LttEvent *e, LttField *f) e->tracefile->trace->system_description->endian ? 0:1; LttTypeEnum t = f->field_type->type_class; - if(t != LTT_UINT || t != LTT_ENUM) + if(t != LTT_UINT && t != LTT_ENUM) g_error("The type of the field is not unsigned int\n"); if(rSize == LTT_LP32){ @@ -347,7 +347,7 @@ unsigned long ltt_event_get_long_unsigned(LttEvent *e, LttField *f) e->tracefile->trace->system_description->endian ? 0:1; LttTypeEnum t = f->field_type->type_class; - if(t != LTT_UINT || t != LTT_ENUM) + if(t != LTT_UINT && t != LTT_ENUM) g_error("The type of the field is not unsigned long\n"); if(rSize == LTT_LP32 || rSize == LTT_ILP32 ){ diff --git a/ltt/branches/poly/ltt/type.c b/ltt/branches/poly/ltt/type.c index 4f90c69a..c7fdebba 100644 --- a/ltt/branches/poly/ltt/type.c +++ b/ltt/branches/poly/ltt/type.c @@ -186,7 +186,7 @@ unsigned ltt_type_size(LttTrace * trace, LttType *t) LttType *ltt_type_element_type(LttType *t) { - if(t->type_class != LTT_ARRAY || t->type_class != LTT_SEQUENCE) + if(t->type_class != LTT_ARRAY && t->type_class != LTT_SEQUENCE) return NULL; return t->element_type[0]; } @@ -218,7 +218,7 @@ unsigned ltt_type_element_number(LttType *t) unsigned ltt_type_member_number(LttType *t) { - if(t->type_class != LTT_STRUCT || t->type_class != LTT_UNION) + if(t->type_class != LTT_STRUCT && t->type_class != LTT_UNION) return 0; return t->element_number; } @@ -271,7 +271,7 @@ char *ltt_enum_string_get(LttType *t, unsigned i) LttField *ltt_field_element(LttField *f) { - if(f->field_type->type_class != LTT_ARRAY || + if(f->field_type->type_class != LTT_ARRAY && f->field_type->type_class != LTT_SEQUENCE) return NULL;