From: compudj Date: Mon, 9 Aug 2004 02:44:17 +0000 (+0000) Subject: union fix X-Git-Tag: v0.12.20~2801 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=6220f7f12883a5be53b66da2c280f749a34ab728;p=lttv.git union fix git-svn-id: http://ltt.polymtl.ca/svn@688 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/ltt/branches/poly/ltt/type.c b/ltt/branches/poly/ltt/type.c index 9885440c..a28e8fe3 100644 --- a/ltt/branches/poly/ltt/type.c +++ b/ltt/branches/poly/ltt/type.c @@ -265,7 +265,7 @@ unsigned ltt_type_member_number(LttType *t) LttType *ltt_type_member_type(LttType *t, unsigned i, char ** name) { if(t->type_class != LTT_STRUCT - || t->type_class != LTT_UNION){*name = NULL; return NULL;} + && t->type_class != LTT_UNION){*name = NULL; return NULL;} if(i >= t->element_number){*name = NULL; return NULL;} *name = t->element_type[i]->element_name; return t->element_type[i]; @@ -322,7 +322,7 @@ LttField *ltt_field_element(LttField *f) LttField *ltt_field_member(LttField *f, unsigned i) { if(f->field_type->type_class != LTT_STRUCT - || f->field_type->type_class != LTT_UNION) return NULL; + && f->field_type->type_class != LTT_UNION) return NULL; if(i >= f->field_type->element_number) return NULL; return f->child[i]; }