]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
grepc: grepc_type_typedef_underlying_struct_union_enum: Fix corner cases
authorAlejandro Colomar <alx.manpages@gmail.com>
Fri, 6 May 2022 00:12:13 +0000 (02:12 +0200)
committerAlejandro Colomar <alx@kernel.org>
Wed, 29 Oct 2025 20:28:44 +0000 (21:28 +0100)
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
bin/grepc

index 1eba43800ab27ef8cb1b814f78a71d4eab6a9e2a..a819cc4f550d9e5b33f6d1503d1ab8b18ecfbd1a 100755 (executable)
--- a/bin/grepc
+++ b/bin/grepc
@@ -109,8 +109,8 @@ function grepc_type_typedef_underlying_struct_union_enum()
 {
        find . -type f \
        | grep '\.[ch]$' \
-       | xargs grep -h "^typedef .* *$1;" \
-       | sed -e 's/^typedef //' -e "s/ *$1;.*//" \
+       | xargs grep -h "^typedef .* *\b$1;" \
+       | sed -e 's/^typedef //' -e "s/ *\b$1;.*//" \
        | while read t; do
                grepc_type_struct_union_enum "$t";
        done;