verify_value_string_arrays_are_terminated.py: allow terminating with '{}'

Writing '{ 0, NULL }' is actually identical to just '{}', and that's what I use
these days in all sorts of other contexts. So allow this notation as well in
the C code grepper.

Change-Id: I0822d2d997dccbfb31316953a7b6024c317d92cf
This commit is contained in:
Neels Hofmeyr 2018-06-09 05:12:41 +02:00 committed by Neels Hofmeyr
parent 98cc650b48
commit 4a85bf4584
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ value_string_array_re = re.compile(
re.MULTILINE | re.DOTALL)
members = r'(\.(value|str)\s*=\s*)?'
terminator_re = re.compile('{\s*' + members + '(0|NULL)\s*,'
terminator_re = re.compile('{}|{\s*' + members + '(0|NULL)\s*,'
'\s*' + members + '(0|NULL)\s*}')
errors_found = 0