diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2018-01-28 19:15:18 +0100 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2018-01-28 19:15:18 +0100 |
| commit | b9cdcb34ead2160dc9cfa5d30d949e4f18cb293f (patch) | |
| tree | 5c8d4887448d7d8c4b229689a69978fef9b3fa54 /kconfiglib.py | |
| parent | 990c780fb42596c41c99608c993b6009ae3f516e (diff) | |
Remove redundant is_constant check
Constant as well as undefined symbols lack menu nodes, so it's
sufficient to check 'nodes'.
Diffstat (limited to 'kconfiglib.py')
| -rw-r--r-- | kconfiglib.py | 5 |
1 files 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])): |
