From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 375771384B4 for ; Thu, 26 Nov 2015 10:39:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 70E7421C104; Thu, 26 Nov 2015 10:39:29 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A910121C101 for ; Thu, 26 Nov 2015 10:39:28 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A159F340688 for ; Thu, 26 Nov 2015 10:39:27 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6AD03612 for ; Thu, 26 Nov 2015 10:39:24 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1448529576.089d4340bdc41d35eab5ba961e8d9d2266e14cbd.vapier@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: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 089d4340bdc41d35eab5ba961e8d9d2266e14cbd X-VCS-Branch: master Date: Thu, 26 Nov 2015 10:39:24 +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-Archives-Salt: 99d0de0f-1f27-4a69-bf69-ab45384450a4 X-Archives-Hash: 502ae10e690490bd393768e92e19b4b6 commit: 089d4340bdc41d35eab5ba961e8d9d2266e14cbd Author: Mike Frysinger gentoo org> AuthorDate: Thu Nov 26 09:19:36 2015 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Thu Nov 26 09:19:36 2015 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=089d4340 quse: use freeargv helper quse.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/quse.c b/quse.c index dddbf5b..049b6e9 100644 --- a/quse.c +++ b/quse.c @@ -400,15 +400,11 @@ int quse_main(int argc, char **argv) print_highlighted_use_flags(&buf0[search_len + 1], optind, argc, argv); puts(NORM); if (verbose > 1) { - char **ARGV = NULL; - int ARGC = 0; + char **ARGV; + int ARGC; makeargv(&buf0[search_len + 1], &ARGC, &ARGV); - if (ARGC > 0) { - quse_describe_flag(1, ARGC, ARGV); - for (i = 0; i < ARGC; i++) - free(ARGV[i]); - free(ARGV); - } + quse_describe_flag(1, ARGC, ARGV); + freeargv(ARGC, ARGV); } } break;