From 4a85bf4584fa1d9a74f45dd7c8258da3a03a3df2 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Sat, 9 Jun 2018 05:12:41 +0200 Subject: 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 --- scripts/verify_value_string_arrays_are_terminated.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') 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 -- cgit v1.2.3