Skip to content

Commit 1961ebb

Browse files
committed
kconfig: Check empty strings on macro expansion
During macro expansion, the parser accepts bare macros on a line as long as they resolve to empty strings. However, the current script checks for whitespace using isspace, which doesn't accurately detect blank strings.
1 parent cd96f26 commit 1961ebb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/kconfig/kconfiglib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2623,7 +2623,7 @@ def _parse_assignment(self, s):
26232623
else:
26242624
break
26252625

2626-
if s.isspace():
2626+
if not s or s.isspace():
26272627
# We also accept a bare macro on a line (e.g.
26282628
# $(warning-if,$(foo),ops)), provided it expands to a blank string
26292629
return

0 commit comments

Comments
 (0)