kconfig: return 'false' instead of 'no' in bool function
diff mbox

Message ID 1451666045-12198-1-git-send-email-vegard.nossum@oracle.com
State New
Headers show

Commit Message

Vegard Nossum Jan. 1, 2016, 4:34 p.m. UTC
menu_is_visible() is a bool function and should use boolean return
values. "no" is a tristate value which happens to also have a value
of 0, but we should nevertheless use the right symbol for it.

This is a very minor cleanup with no semantic change.

Fixes: 86e187ff9 ("kconfig: add an option to determine a menu's visibility")
Cc: Arnaud Lacombe <lacombar@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
---
 scripts/kconfig/menu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Michal Marek Jan. 5, 2016, 10:20 a.m. UTC | #1
On 2016-01-01 17:34, Vegard Nossum wrote:
> menu_is_visible() is a bool function and should use boolean return
> values. "no" is a tristate value which happens to also have a value
> of 0, but we should nevertheless use the right symbol for it.
> 
> This is a very minor cleanup with no semantic change.
> 
> Fixes: 86e187ff9 ("kconfig: add an option to determine a menu's visibility")
> Cc: Arnaud Lacombe <lacombar@gmail.com>
> Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
> Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>

Thanks, applied to kbuild.git#kconfig.

Michal

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index b05cc3d..aed678e 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -477,7 +477,7 @@  bool menu_is_visible(struct menu *menu)
 
 	if (menu->visibility) {
 		if (expr_calc_value(menu->visibility) == no)
-			return no;
+			return false;
 	}
 
 	sym = menu->sym;