mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
checkpatch: Fix regexp for if, while, etc inside macros.
This allows to use a one-character expression inside the 'if'
statement and multiple spaces before the line continuation character.
Fixes false positive in case like this:
#define MACRO(ARG) \
if (a) { \
do_work(ARG); \
}
Fixes: 16770c6d91
("checkpatch: support macro continuation")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Aaron Conole <aconole@redhat.com>
This commit is contained in:
@@ -172,7 +172,7 @@ __regex_has_xxx_mark = re.compile(r'.*xxx.*', re.IGNORECASE)
|
||||
__regex_added_doc_rst = re.compile(
|
||||
r'\ndiff .*Documentation/.*rst\nnew file mode')
|
||||
__regex_empty_return = re.compile(r'\s*return;')
|
||||
__regex_if_macros = re.compile(r'^ +(%s) \([\S][\s\S]+[\S]\) { \\' %
|
||||
__regex_if_macros = re.compile(r'^ +(%s) \([\S]([\s\S]+[\S])*\) { +\\' %
|
||||
__parenthesized_constructs)
|
||||
|
||||
skip_leading_whitespace_check = False
|
||||
|
Reference in New Issue
Block a user