diff options
author | Guy Harris <gharris@sonic.net> | 2020-06-21 17:13:54 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2020-06-22 09:12:58 +0000 |
commit | c3d5ddc5576db68e57d23ee09ceb3278e03639e9 (patch) | |
tree | 70b1b5a7504521d354c55eb8082cc01f5da9a555 /tools/generate-sysdig-event.py | |
parent | 74d7c3d14f0ad79dbf657d80fcfb68bc16cff717 (diff) |
sysdig-event: fix the type of elements of an array of pointers to hf_ values.
"int * const a[]" means "array of const pointers to (non-const) int". so
the array elements are all const; "const int *a[]" means "array of
(non-const) pointrs to const int".
Change-Id: I0571fde7704570b60c9cbd5d94826365ff35abe0
Reviewed-on: https://code.wireshark.org/review/37546
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
Diffstat (limited to 'tools/generate-sysdig-event.py')
-rwxr-xr-x | tools/generate-sysdig-event.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/generate-sysdig-event.py b/tools/generate-sysdig-event.py index bd2b95dd26..ae5347f7b4 100755 --- a/tools/generate-sysdig-event.py +++ b/tools/generate-sysdig-event.py @@ -224,7 +224,7 @@ def main(): ei_str = '' if param_id not in idx_id_to_name: idx_id_to_name[param_id] = event_var - ei_str = 'static const int *{}_indexes[] = {{ &{}, NULL }};'.format( + ei_str = 'static int * const {}_indexes[] = {{ &{}, NULL }};'.format( event_var, ', &'.join(param_l) ) @@ -246,6 +246,7 @@ def main(): strip_re_l.append(re.compile('^#define\s+EVT_[A-Z0-9_]+\s+[0-9]+')) strip_re_l.append(re.compile('^\s*{\s*EVT_[A-Z0-9_]+\s*,\s*EVT_STR_[A-Z0-9_]+\s*}')) strip_re_l.append(re.compile('^static\s+const\s+int\s+\*\s*[a-z0-9_]+_[ex]_indexes\[\]\s*=\s*\{\s*&hf_param_.*NULL\s*\}\s*;')) + strip_re_l.append(re.compile('^static\s+int\s*\*\s+const\s+[a-z0-9_]+_[ex]_indexes\[\]\s*=\s*\{\s*&hf_param_.*NULL\s*\}\s*;')) strip_re_l.append(re.compile('^\s*#define\s+[a-z0-9_]+_[ex]_indexes\s+[a-z0-9_]+_indexes')) strip_re_l.append(re.compile('^\s*\{\s*EVT_[A-Z0-9_]+_[EX]\s*,\s*[a-z0-9_]+_[ex]_indexes\s*}\s*,')) strip_re_l.append(re.compile('^\s*{\s*&hf_param_.*},')) # Must all be on one line |