aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/c-lint.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/c-lint.sh b/tests/c-lint.sh
index 7c5516d..42d185c 100755
--- a/tests/c-lint.sh
+++ b/tests/c-lint.sh
@@ -1,8 +1,9 @@
#!/bin/sh
-if [ -n "$(grep -En '[a-z]+\(\) {' "$@")" ]; then
+RE='[a-z]+\(\) {'
+if grep -Eq "$RE" "$@"; then
echo 'Functions with no argument without explicit "void" parameter:' >&2
- grep -En '[a-z]+\(\) {' "$@"
+ grep -En "$RE" "$@"
exit 1
fi