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 C043D1382C5 for ; Wed, 17 Feb 2021 20:23:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CA2B9E0898; Wed, 17 Feb 2021 20:23:35 +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 B103EE0898 for ; Wed, 17 Feb 2021 20:23:35 +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 A7BB9341947 for ; Wed, 17 Feb 2021 20:23:34 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1C71F4C6 for ; Wed, 17 Feb 2021 20:23:33 +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: <1613593117.d5eeb8c6f9d455fba2356de43f35d88c1321504b.grobian@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: / X-VCS-Repository: proj/portage-utils X-VCS-Files: qkeyword.c X-VCS-Directories: / X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: d5eeb8c6f9d455fba2356de43f35d88c1321504b X-VCS-Branch: master Date: Wed, 17 Feb 2021 20:23:33 +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: 6c50aad6-76b4-4a74-b873-2a6812e27995 X-Archives-Hash: 96ea88ac6646fc7da6ee40afe3b5f840 commit: d5eeb8c6f9d455fba2356de43f35d88c1321504b Author: Fabian Groffen gentoo org> AuthorDate: Wed Feb 17 20:18:37 2021 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Wed Feb 17 20:18:37 2021 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=d5eeb8c6 qkeyword: take advantage of new atom_explode_cat Signed-off-by: Fabian Groffen gentoo.org> qkeyword.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/qkeyword.c b/qkeyword.c index 7a60022..f6cdbc2 100644 --- a/qkeyword.c +++ b/qkeyword.c @@ -855,12 +855,9 @@ int qkeyword_main(int argc, char **argv) qkeyword_usage(EXIT_FAILURE); if (cat != NULL) { - char buf[_Q_PATH_MAX]; - - snprintf(buf, sizeof(buf), "%s/%s", cat, pkg == NULL ? "" : pkg); - data.qatom = atom_explode(buf); + data.qatom = atom_explode_cat(pkg == NULL ? "" : pkg, cat); if (data.qatom == NULL) { - warnf("invalid cat/pkg: %s\n", buf); + warnf("invalid cat/pkg: %s/%s\n", cat, pkg == NULL ? "" : pkg); return EXIT_FAILURE; } } else if (pkg != NULL) {