diff options
| author | Alejandro Colomar <alx.manpages@gmail.com> | 2022-05-09 00:37:18 +0200 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2025-10-29 21:28:48 +0100 |
| commit | 028e926879191aca7d7f563d22aae2b5917bd8a2 (patch) | |
| tree | 230d92dc114536dfea0c645fd3cad2eccaaf1e00 | |
| parent | b8c9b7209e02a135d5e1e102a8ace60a70e45dba (diff) | |
| download | man-pages-028e926879191aca7d7f563d22aae2b5917bd8a2.tar.gz | |
grepc: grepc_type_typedef_underlying_struct_union_enum: Don't duplicate output
In typedefs of the form 'typedef struct foo foo;', don't print the
structure twice.
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
| -rwxr-xr-x | bin/grepc | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -151,7 +151,8 @@ function grepc_type_typedef_underlying_struct_union_enum() | sed -E -e 's/^typedef\s+//' -e "s/\s*\**\b$1;.*//" \ | sed -E -e 's/^struct\s+//' -e 's/^union\s+//' -e 's/^enum\s+//' \ | while read t; do - grepc_type_struct_union_enum "$t"; + test "$1" != "$t" \ + && grepc_type_struct_union_enum "$t"; done; } |
