aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-06-09 05:12:41 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2018-06-16 13:46:41 +0000
commit4a85bf4584fa1d9a74f45dd7c8258da3a03a3df2 (patch)
treef755973195bb5dd70556193e083177ce8c7b1960
parent98cc650b48fcd906002bb1b11335f9738a6d6044 (diff)
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
-rwxr-xr-xscripts/verify_value_string_arrays_are_terminated.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/verify_value_string_arrays_are_terminated.py b/scripts/verify_value_string_arrays_are_terminated.py
index 020bb4d..ad936a5 100755
--- a/scripts/verify_value_string_arrays_are_terminated.py
+++ b/scripts/verify_value_string_arrays_are_terminated.py
@@ -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