summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorArnaud Lacombe <lacombar@gmail.com>2011-07-10 09:27:33 +0200
committerMichal Marek <mmarek@suse.cz>2011-07-13 13:54:01 +0200
commita1e806550e566e987e06561873ab8276ee54d130 (patch)
tree3a21c4c542913dfbd5e4206b3955e62a2aa0ef22 /scripts
parentkconfig/nconf: prevent segfault on empty menu (diff)
downloadlinux-a1e806550e566e987e06561873ab8276ee54d130.tar.xz
linux-a1e806550e566e987e06561873ab8276ee54d130.zip
kconfig/nconf: remove useless conditionnal
After the test if (!submenu || ...) continue; the variable `submenu' can _not_ be NULL, so do not test for this situation. Cc: Nir Tzachar <nir.tzachar@gmail.com> Signed-off-by: Arnaud Lacombe <lacombar@gmail.com> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/nconf.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c
index d6345df1ce12..39ca1f1640ea 100644
--- a/scripts/kconfig/nconf.c
+++ b/scripts/kconfig/nconf.c
@@ -1153,10 +1153,7 @@ static void conf(struct menu *menu)
submenu = (struct menu *) item_data();
if (!submenu || !menu_is_visible(submenu))
continue;
- if (submenu)
- sym = submenu->sym;
- else
- sym = NULL;
+ sym = submenu->sym;
switch (res) {
case ' ':