From b9cdcb34ead2160dc9cfa5d30d949e4f18cb293f Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Sun, 28 Jan 2018 19:15:18 +0100 Subject: Remove redundant is_constant check Constant as well as undefined symbols lack menu nodes, so it's sufficient to check 'nodes'. --- kconfiglib.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kconfiglib.py b/kconfiglib.py index e54e26e..6ea71b4 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -4190,10 +4190,11 @@ def _check_sym_sanity(sym): # valid. Not much we can do for nonconstant defaults. # # A constant default is either a constant (quoted) symbol or an - # undefined symbol, which will get its name as its value. + # undefined symbol, which will get its name as its value. Both have + # an empty 'nodes' attribute. if not isinstance(default, Symbol) or \ (sym.orig_type in (INT, HEX) and - (default.is_constant or not default.nodes) and + not default.nodes and not _is_base_n(default.str_value, _TYPE_TO_BASE[sym.orig_type])): -- cgit v1.2.3