projects
/
kconfig-hardened-check.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
260582e
)
Simplify perform_checks()
author
Alexander Popov
<alex.popov@linux.com>
Thu, 5 Mar 2020 09:07:33 +0000
(12:07 +0300)
committer
Alexander Popov
<alex.popov@linux.com>
Thu, 5 Mar 2020 09:07:33 +0000
(12:07 +0300)
kconfig-hardened-check.py
patch
|
blob
|
history
diff --git
a/kconfig-hardened-check.py
b/kconfig-hardened-check.py
index 56c52ecc1b3c154a5f7350d29676ab6191b36661..0975ba04042087fefe1ea9df5d57c4b62bc0b0b8 100755
(executable)
--- a/
kconfig-hardened-check.py
+++ b/
kconfig-hardened-check.py
@@
-417,17
+417,15
@@
def print_checklist(checklist, with_results):
print()
-def get_option_state(options, name):
- return options.get(name, None)
-
-
def perform_checks(checklist, parsed_options):
for opt in checklist:
if hasattr(opt, 'opts'):
+ # prepare ComplexOptCheck
for o in opt.opts:
- o.state =
get_option_state(parsed_options, o.nam
e)
+ o.state =
parsed_options.get(o.name, Non
e)
else:
- opt.state = get_option_state(parsed_options, opt.name)
+ # prepare OptCheck
+ opt.state = parsed_options.get(opt.name, None)
opt.check()