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 50A39138346 for ; Mon, 6 Jan 2020 08:03:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8E171E094E; Mon, 6 Jan 2020 08:03:14 +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 74D0BE094E for ; Mon, 6 Jan 2020 08:03:14 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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 0454A34DDFE for ; Mon, 6 Jan 2020 08:03:13 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B892E89 for ; Mon, 6 Jan 2020 08:03:10 +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: <1578297751.0e6d9d14f58fc388b4dca9ce19845f69a553b957.grobian@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: / X-VCS-Repository: proj/portage-utils X-VCS-Files: quse.c X-VCS-Directories: / X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 0e6d9d14f58fc388b4dca9ce19845f69a553b957 X-VCS-Branch: master Date: Mon, 6 Jan 2020 08:03:10 +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: 745cfa53-f06b-4051-98c0-7076b4e32baf X-Archives-Hash: 32b52e27c582731f68ad19c01021c54f commit: 0e6d9d14f58fc388b4dca9ce19845f69a553b957 Author: Fabian Groffen gentoo org> AuthorDate: Mon Jan 6 08:02:31 2020 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Mon Jan 6 08:02:31 2020 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=0e6d9d14 quse: fix new Coverity complaints Signed-off-by: Fabian Groffen gentoo.org> quse.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/quse.c b/quse.c index dca2f1c..4a8b89b 100644 --- a/quse.c +++ b/quse.c @@ -432,7 +432,7 @@ quse_results_cb(tree_pkg_ctx *pkg_ctx, void *priv) } if (!state->do_licence) { - if ((q = tree_pkg_meta_get(pkg_ctx, IUSE)) == NULL) + if ((s = tree_pkg_meta_get(pkg_ctx, IUSE)) == NULL) return 0; if (state->do_describe) { @@ -454,14 +454,14 @@ quse_results_cb(tree_pkg_ctx *pkg_ctx, void *priv) use = add_set(p, use); } } else { - if ((q = tree_pkg_meta_get(pkg_ctx, LICENSE)) == NULL) + if ((s = tree_pkg_meta_get(pkg_ctx, LICENSE)) == NULL) return 0; } maxlen = 0; cnt = 0; match = false; - p = q; /* set to IUSE or LICENSE above */ + p = q = s; /* set to IUSE or LICENSE above */ buf[0] = '\0'; v = buf; w = buf + sizeof(buf); @@ -631,7 +631,7 @@ quse_results_cb(tree_pkg_ctx *pkg_ctx, void *priv) if (use != NULL) free_set(use); - if (state->do_describe) + if (state->do_describe && !state->do_licence) close(portdirfd); return EXIT_SUCCESS;