summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2022-05-10 19:33:15 +0200
committerAlejandro Colomar <alx.manpages@gmail.com>2022-05-10 19:33:17 +0200
commit2a1870db849fb92a15149fe7e012feaf6c84d2cc (patch)
tree77db6f47306463df747f15b105158517a6630546 /bin
parent401cbc3780e176fffebbfcac735af75b74785c20 (diff)
grepc: Use -r option to read(1)
Let's fall on the safe side. Reported-by: наб <nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/grepc2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/grepc b/bin/grepc
index 7c2e8ca..b5ce94a 100755
--- 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;