dissect: cleanup report_implicit()
PATCH 1/1 dissect: cleanup report_implicit()
It doesn't make sense to do report_implicit() for the anonymous structures, check "type->ident != NULL".
Signed-off-by Oleg Nesterov <[email protected]>
dissect.c renamed from dissect.c~ +6 -4
@@ -130,12 +130,14 @@ static void report_implicit(usage_t modeif (type->type !=SYM_STRUCT && type->type !=SYM_UNION )return ; -if (reporter->r_member) { +if (!reporter->r_member) +return ; + +if (type->ident !=NULL ) reporter->r_member (mode, pos, type,NULL ); -DO_LIST (type->symbol_list, mem, -report_implicit (mode, pos,base_type (mem))); - } +DO_LIST (type->symbol_list, mem, +report_implicit (mode, pos,base_type (mem))); }static inline struct symbol *expr_symbol (struct expression *expr)
Josh Triplett
AppliedQuoted 4 lines · Oleg Nesterov
It doesn't make sense to do
report_implicit()for the anonymous structures, check "type->ident!= NULL".Signed-off-by Oleg Nesterov <[email protected]>
Applied.
- Josh Triplett