File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,7 +112,6 @@ struct symbol *sym_choice_default(struct symbol *sym);
112112struct property * sym_get_range_prop (struct symbol * sym );
113113const char * sym_get_string_default (struct symbol * sym );
114114struct symbol * sym_check_deps (struct symbol * sym );
115- struct property * prop_alloc (enum prop_type type , struct symbol * sym );
116115struct symbol * prop_get_symbol (struct property * prop );
117116
118117static inline tristate sym_get_tristate_value (struct symbol * sym )
Original file line number Diff line number Diff line change @@ -127,12 +127,28 @@ void menu_set_type(int type)
127127static struct property * menu_add_prop (enum prop_type type , struct expr * expr ,
128128 struct expr * dep )
129129{
130- struct property * prop = prop_alloc ( type , current_entry -> sym ) ;
130+ struct property * prop ;
131131
132+ prop = xmalloc (sizeof (* prop ));
133+ memset (prop , 0 , sizeof (* prop ));
134+ prop -> type = type ;
135+ prop -> file = current_file ;
136+ prop -> lineno = zconf_lineno ();
132137 prop -> menu = current_entry ;
133138 prop -> expr = expr ;
134139 prop -> visible .expr = dep ;
135140
141+ /* append property to the prop list of symbol */
142+ if (current_entry -> sym ) {
143+ struct property * * propp ;
144+
145+ for (propp = & current_entry -> sym -> prop ;
146+ * propp ;
147+ propp = & (* propp )-> next )
148+ ;
149+ * propp = prop ;
150+ }
151+
136152 return prop ;
137153}
138154
Original file line number Diff line number Diff line change @@ -1273,27 +1273,6 @@ struct symbol *sym_check_deps(struct symbol *sym)
12731273 return sym2 ;
12741274}
12751275
1276- struct property * prop_alloc (enum prop_type type , struct symbol * sym )
1277- {
1278- struct property * prop ;
1279- struct property * * propp ;
1280-
1281- prop = xmalloc (sizeof (* prop ));
1282- memset (prop , 0 , sizeof (* prop ));
1283- prop -> type = type ;
1284- prop -> file = current_file ;
1285- prop -> lineno = zconf_lineno ();
1286-
1287- /* append property to the prop list of symbol */
1288- if (sym ) {
1289- for (propp = & sym -> prop ; * propp ; propp = & (* propp )-> next )
1290- ;
1291- * propp = prop ;
1292- }
1293-
1294- return prop ;
1295- }
1296-
12971276struct symbol * prop_get_symbol (struct property * prop )
12981277{
12991278 if (prop -> expr && (prop -> expr -> type == E_SYMBOL ||
You can’t perform that action at this time.
0 commit comments