Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
checkpatch: remove false unbalanced braces warning
Lines containing "} else {" should not be detected as unbalanced braces. But the second check can be reduced to ".+else\s*{" and it therefore never checked if the beginning of a line contains any other character (like the relevant "}"). This check would also return true for "} else {" and create warnings like CHECK: Unbalanced braces around else statement torvalds#391: FILE: ./net/batman-adv/tvlv.c:391: + } else { The check can be changed to check the whole line for the missing "}" to avoid this false positive. Fixes: 0d15324 ("checkpatch: notice unbalanced else braces in a patch") Signed-off-by: Sven Eckelmann <sven@narfation.org>
- Loading branch information