[PATCH] kconfig/nconf: remove useless conditionnal

From: Arnaud Lacombe
Date: Sun Jul 10 2011 - 03:27:48 EST


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@xxxxxxxxx>
Signed-off-by: Arnaud Lacombe <lacombar@xxxxxxxxx>
---
scripts/kconfig/nconf.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c
index eb9e49d..6b189c8 100644
--- a/scripts/kconfig/nconf.c
+++ b/scripts/kconfig/nconf.c
@@ -1155,10 +1155,7 @@ static void conf(struct menu *menu)
active_menu = (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 ' ':
--
1.7.3.4.574.g608b.dirty

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/