kconfig: Clarify menu and 'if' dependency propagation
authorUlf Magnusson <ulfalizer@gmail.com>
Tue, 16 Jan 2018 20:39:02 +0000 (21:39 +0100)
committerChristian Lamparter <chunkeey@gmail.com>
Sun, 10 Feb 2019 20:54:37 +0000 (21:54 +0100)
It is not obvious that the last two cases refer to menus and ifs,
respectively, in the conditional that sets 'parentdep'.

Automatic submenu creation is done later, so the parent can't be a
symbol here.

No functional changes. Only comments added.

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
config/menu.c

index af66065733bb636be638d72c9fe4492692462d28..d365fc9513c5a6c57cb3619ba3a6ad32e6941c74 100644 (file)
@@ -332,8 +332,10 @@ void menu_finalize(struct menu *parent)
                         */
                        parentdep = expr_alloc_symbol(sym);
                } else if (parent->prompt)
+                       /* Menu node for 'menu' */
                        parentdep = parent->prompt->visible.expr;
                else
+                       /* Menu node for 'if' */
                        parentdep = parent->dep;
 
                /* For each child menu node... */