diff options
| author | Alejandro Colomar <alx.manpages@gmail.com> | 2022-05-09 13:38:43 +0200 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2025-10-29 21:28:50 +0100 |
| commit | 34069b77540f3a765417e3acbc7798066b4a1539 (patch) | |
| tree | d231962aa770426306dfaf8ac44179b218026428 | |
| parent | 0f75cadf00aa9a70a4a5178e4b50a4e7546cc3f1 (diff) | |
| download | man-pages-34069b77540f3a765417e3acbc7798066b4a1539.tar.gz | |
grepc: grepc_type_struct_union_enum: Don't duplicate output
In definitions of the form
typedef struct foo {...} foo;
grepc_type_typedef_struct_union_enum() is already finding it.
Remove the duplicate here.
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
| -rwxr-xr-x | bin/grepc | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -111,7 +111,7 @@ function grepc_type_struct_union_enum() { grepc_helper '\.[ch]$' \ "\b(struct|union|enum)\s+$1\b" \ - "(?s)^([\w[][\w\s(,)[:\]*]+\s+)?\b(struct|union|enum)\s+$1\b\s*[\w\s[\]]*{.*?^}.*?;"; + "(?s)^(?!^typedef\b)([\w[][\w\s(,)[:\]*]+\s+)?\b(struct|union|enum)\s+$1\b\s*[\w\s[\]]*{.*?^}.*?;"; } |
