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 B3F84138334 for ; Sat, 21 Sep 2019 20:17:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 11C0EE08BF; Sat, 21 Sep 2019 20:17:09 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 EEE62E08BF for ; Sat, 21 Sep 2019 20:17:08 +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 BFEEA34B475 for ; Sat, 21 Sep 2019 20:17:07 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3FD40218 for ; Sat, 21 Sep 2019 20:17:05 +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: <1569097006.de23ef44734dd428fd6de70d2d2d6d40b7768fff.grobian@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: / X-VCS-Repository: proj/portage-utils X-VCS-Files: qlop.c X-VCS-Directories: / X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: de23ef44734dd428fd6de70d2d2d6d40b7768fff X-VCS-Branch: master Date: Sat, 21 Sep 2019 20:17:05 +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: 85ea281c-f0e9-4c9a-9de5-55c1552ac85a X-Archives-Hash: f366aedba1e24c35b12b80108945d7f4 commit: de23ef44734dd428fd6de70d2d2d6d40b7768fff Author: Fabian Groffen gentoo org> AuthorDate: Sat Sep 21 20:16:46 2019 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sat Sep 21 20:16:46 2019 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=de23ef44 qlop: fix last merge timeframe detection Signed-off-by: Fabian Groffen gentoo.org> qlop.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/qlop.c b/qlop.c index 63a40a8..fcaf973 100644 --- a/qlop.c +++ b/qlop.c @@ -373,6 +373,8 @@ static int do_emerge_log( all_atoms = array_cnt(atoms) == 0; if (all_atoms || flags->show_lastmerge) { + atomset = create_set(); + /* assemble list of atoms */ while (fgets(buf, sizeof(buf), fp) != NULL) { if ((p = strchr(buf, ':')) == NULL) @@ -422,9 +424,6 @@ static int do_emerge_log( atom->PR_int = 0; snprintf(afmt, sizeof(afmt), "%s/%s", atom->CATEGORY, atom->PN); - if (atomset == NULL) - atomset = create_set(); - /* now we found a package, register this merge as a * "valid" one, such that dummy emerge calls (e.g. * emerge -pv foo) are ignored */ @@ -435,7 +434,9 @@ static int do_emerge_log( array_for_each(&vals, i, atomw) atom_implode(atomw); xarrayfree_int(&vals); + clear_set(atomset); + last_merge = tstart_emerge; } atomw = add_set_value(afmt, atom, atomset);