projects
/
carl9170fw.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
kconfig: use parent->dep as the parentdep of 'menu'
[carl9170fw.git]
/
config
/
menu.c
diff --git
a/config/menu.c
b/config/menu.c
index 7e2b2c938d7ba053b1ed2583b45596e081d39ecb..bbabf0a59ac4e488052111c02f7e8bd29f29fc94 100644
(file)
--- a/
config/menu.c
+++ b/
config/menu.c
@@
-1,6
+1,6
@@
+// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
/*
* Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
- * Released under the terms of the GNU GPL v2.0.
*/
#include <ctype.h>
*/
#include <ctype.h>
@@
-138,7
+138,7
@@
static struct property *menu_add_prop(enum prop_type type, char *prompt, struct
while (isspace(*prompt))
prompt++;
}
while (isspace(*prompt))
prompt++;
}
- if (current_entry->prompt
&& current_entry != &rootmenu
)
+ if (current_entry->prompt)
prop_warn(prop, "prompt redefined");
/* Apply all upper menus' visibilities to actual prompts. */
prop_warn(prop, "prompt redefined");
/* Apply all upper menus' visibilities to actual prompts. */
@@
-326,12
+326,10
@@
void menu_finalize(struct menu *parent)
* choice value symbols.
*/
parentdep = expr_alloc_symbol(sym);
* choice value symbols.
*/
parentdep = expr_alloc_symbol(sym);
- } else if (parent->prompt)
- /* Menu node for 'menu' */
- parentdep = parent->prompt->visible.expr;
- else
- /* Menu node for 'if' */
+ } else {
+ /* Menu node for 'menu', 'if' */
parentdep = parent->dep;
parentdep = parent->dep;
+ }
/* For each child menu node... */
for (menu = parent->list; menu; menu = menu->next) {
/* For each child menu node... */
for (menu = parent->list; menu; menu = menu->next) {