From: Matt Kraai Date: Thu, 4 Jan 2001 15:11:52 +0000 (-0000) Subject: Fixed -qv interaction (thanks to a report and patch from David Douthitt). X-Git-Tag: 0_49~80 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0810f723b137cb73d41b9021b3ea945f98001159;p=oweals%2Fbusybox.git Fixed -qv interaction (thanks to a report and patch from David Douthitt). --- 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) } else if (ret == REG_NOMATCH && invert_search) { + if (be_quiet) { + regfree(®ex); + exit(0); + } + nmatches++; print_matched_line(line, linenum); } diff --git a/grep.c b/grep.c index 83336613e..69195bfdc 100644 --- a/grep.c +++ b/grep.c @@ -85,6 +85,11 @@ static void grep_file(FILE *file) } else if (ret == REG_NOMATCH && invert_search) { + if (be_quiet) { + regfree(®ex); + exit(0); + } + nmatches++; print_matched_line(line, linenum); }