commit:     6375888fb82710a5f158dd84383a0b1e8d41299f
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 19 12:00:17 2020 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Jan 19 12:00:17 2020 +0000
URL:        https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=6375888f

qgrep: fix Coverity 206568 Logically dead code

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 qgrep.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/qgrep.c b/qgrep.c
index 019b0b6..699f35b 100644
--- a/qgrep.c
+++ b/qgrep.c
@@ -240,10 +240,7 @@ qgrep_grepat(int fd, const char *file, const char *label,
                return status;
 
        count = 0;
-       /* if there have been some matches already, then a
-        * separator will be needed */
-       need_separator =
-               !status && (a->num_lines_before || a->num_lines_after);
+       need_separator = 0;
        /* whatever is in the circular buffers list is no more a
         * valid context */
        qgrep_buf_list_invalidate(a->buf_list);

Reply via email to