From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 356F7138351 for ; Sun, 19 Jan 2020 12:37:21 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D6883E0901; Sun, 19 Jan 2020 12:37:19 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BC943E0901 for ; Sun, 19 Jan 2020 12:37:19 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1D8A234E280 for ; Sun, 19 Jan 2020 12:37:18 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1C376D9 for ; Sun, 19 Jan 2020 12:37:16 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1579435217.6375888fb82710a5f158dd84383a0b1e8d41299f.grobian@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: / X-VCS-Repository: proj/portage-utils X-VCS-Files: qgrep.c X-VCS-Directories: / X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 6375888fb82710a5f158dd84383a0b1e8d41299f X-VCS-Branch: master Date: Sun, 19 Jan 2020 12:37:16 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 6236ff49-3f7c-4a91-8544-d7c609104c35 X-Archives-Hash: e4c3e777aa182ff076bfd7892c091687 commit: 6375888fb82710a5f158dd84383a0b1e8d41299f Author: Fabian Groffen gentoo org> AuthorDate: Sun Jan 19 12:00:17 2020 +0000 Commit: Fabian Groffen gentoo 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 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);