diff options
author | Matt Kraai <kraai@debian.org> | 2001-01-04 15:11:52 +0000 |
---|---|---|
committer | Matt Kraai <kraai@debian.org> | 2001-01-04 15:11:52 +0000 |
commit | 0810f723b137cb73d41b9021b3ea945f98001159 (patch) | |
tree | 8aa4290757f512a93ca356ee8f77947c1145d7f6 /findutils/grep.c | |
parent | 09acc06c106e31841a4246532bbba39da97ce3b1 (diff) | |
download | busybox-w32-0810f723b137cb73d41b9021b3ea945f98001159.tar.gz busybox-w32-0810f723b137cb73d41b9021b3ea945f98001159.tar.bz2 busybox-w32-0810f723b137cb73d41b9021b3ea945f98001159.zip |
Fixed -qv interaction (thanks to a report and patch from David Douthitt).
Diffstat (limited to 'findutils/grep.c')
-rw-r--r-- | findutils/grep.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/findutils/grep.c b/findutils/grep.c index 83336613e..69195bfdc 100644 --- a/findutils/grep.c +++ b/findutils/grep.c | |||
@@ -85,6 +85,11 @@ static void grep_file(FILE *file) | |||
85 | 85 | ||
86 | } | 86 | } |
87 | else if (ret == REG_NOMATCH && invert_search) { | 87 | else if (ret == REG_NOMATCH && invert_search) { |
88 | if (be_quiet) { | ||
89 | regfree(®ex); | ||
90 | exit(0); | ||
91 | } | ||
92 | |||
88 | nmatches++; | 93 | nmatches++; |
89 | print_matched_line(line, linenum); | 94 | print_matched_line(line, linenum); |
90 | } | 95 | } |