[PATCH 01/16] Add enum member list to the parent

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

 



From: Christopher Li <sparse@xxxxxxxxxxx>

Signed-Off-By: Christopher Li <sparse@xxxxxxxxxxx>
Acked-by: Thomas Schmid <Thomas.Schmid@xxxxxxxxxxxxxxxxx>
---
 parse.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/parse.c b/parse.c
index 915ae20..eb31871 100644
--- a/parse.c
+++ b/parse.c
@@ -665,7 +665,6 @@ static struct token *parse_enum_declaration(struct token *token, struct symbol *
 	unsigned long long lastval = 0;
 	struct symbol *ctype = NULL, *base_type = NULL;
 	Num upper = {-1, 0}, lower = {1, 0};
-	struct symbol_list *entries = NULL;
 
 	parent->examined = 1;
 	parent->ctype.base_type = &int_ctype;
@@ -701,7 +700,7 @@ static struct token *parse_enum_declaration(struct token *token, struct symbol *
 		sym->initializer = expr;
 		sym->enum_member = 1;
 		sym->ctype.base_type = parent;
-		add_ptr_list(&entries, sym);
+		add_ptr_list(&parent->symbol_list, sym);
 
 		if (base_type != &bad_ctype) {
 			if (ctype->type == SYM_NODE)
@@ -777,8 +776,7 @@ static struct token *parse_enum_declaration(struct token *token, struct symbol *
 	parent->ctype.modifiers |= (base_type->ctype.modifiers & MOD_UNSIGNED);
 	parent->examined = 0;
 
-	cast_enum_list(entries, base_type);
-	free_ptr_list(&entries);
+	cast_enum_list(parent->symbol_list, base_type);
 
 	return token;
 }

--
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