[PATCH] dissect: cleanup report_implicit()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It doesn't make sense to do report_implicit() for the anonymous structures,
check "type->ident != NULL".

Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>

--- DS/dissect.c~	2006-04-21 00:04:14.000000000 +0400
+++ DS/dissect.c	2006-04-21 01:04:14.000000000 +0400
@@ -130,12 +130,14 @@ static void report_implicit(usage_t mode
 	if (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)

-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux