aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--findutils/grep.c5
-rw-r--r--grep.c5
2 files changed, 10 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(&regex);
90 exit(0);
91 }
92
88 nmatches++; 93 nmatches++;
89 print_matched_line(line, linenum); 94 print_matched_line(line, linenum);
90 } 95 }
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)
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(&regex);
90 exit(0);
91 }
92
88 nmatches++; 93 nmatches++;
89 print_matched_line(line, linenum); 94 print_matched_line(line, linenum);
90 } 95 }