]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
grepc: Use -r option to read(1)
authorAlejandro Colomar <alx.manpages@gmail.com>
Tue, 10 May 2022 17:33:15 +0000 (19:33 +0200)
committerAlejandro Colomar <alx@kernel.org>
Wed, 29 Oct 2025 20:28:56 +0000 (21:28 +0100)
Let's fall on the safe side.

Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
bin/grepc

index 7c2e8caf927c33faafa1982591ce2a7f7de4b5bc..b5ce94a41a37118f10c5e654167947a9c944e481 100755 (executable)
--- a/bin/grepc
+++ b/bin/grepc
@@ -156,7 +156,7 @@ grepc_type_typedef_underlying_struct_union_enum()
        xargs grep -hP "^\s*typedef\s+(struct|union|enum)\s+.*\b$1;" <"$files" \
        | sed -E -e 's/^\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
+       | while read -r t; do
                test "$1" != "$t" \
                && grepc_type_struct_union_enum "$t";
        done;