aboutsummaryrefslogtreecommitdiff
path: root/qlop.c
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2023-02-07 09:08:13 +0100
committerFabian Groffen <grobian@gentoo.org>2023-02-07 09:08:13 +0100
commite2ebb44db31d4e0e9bfc0a9974d36eff63c8b2b1 (patch)
tree992157f1f78251bd617bf445c6b818a2314440dd /qlop.c
parentqmerge: add some braindump notes about how things could be (diff)
downloadportage-utils-e2ebb44db31d4e0e9bfc0a9974d36eff63c8b2b1.tar.gz
portage-utils-e2ebb44db31d4e0e9bfc0a9974d36eff63c8b2b1.tar.bz2
portage-utils-e2ebb44db31d4e0e9bfc0a9974d36eff63c8b2b1.zip
set: ensure NULL is empty behaviour is retained throughout
Not all set functions respected NULL is empty behaviour, changed add_set_value signature to return a set instead so it can conform. Bug: https://bugs.gentoo.org/893424 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'qlop.c')
-rw-r--r--qlop.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/qlop.c b/qlop.c
index 16bf69f..3e6db53 100644
--- a/qlop.c
+++ b/qlop.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2005-2022 Gentoo Foundation
+ * Copyright 2005-2023 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
*
* Copyright 2005-2010 Ned Ludd - <solar@gentoo.org>
@@ -523,7 +523,7 @@ static int do_emerge_log(
last_merge = tstart_emerge;
}
- atomw = add_set_value(afmt, atom, atomset);
+ atomset = add_set_value(afmt, atom, (void **)&atomw, atomset);
if (atomw != NULL)
atom_implode(atom);
}
@@ -807,7 +807,9 @@ static int do_emerge_log(
pkgw->atom->CATEGORY, pkgw->atom->PN);
}
- pkg = add_set_value(afmt, pkgw, merge_averages);
+ merge_averages =
+ add_set_value(afmt, pkgw,
+ (void **)&pkg, merge_averages);
if (pkg != NULL) {
pkg->cnt++;
pkg->time += elapsed;
@@ -952,7 +954,9 @@ static int do_emerge_log(
pkgw->atom->CATEGORY, pkgw->atom->PN);
}
- pkg = add_set_value(afmt, pkgw, unmerge_averages);
+ unmerge_averages =
+ add_set_value(afmt, pkgw,
+ (void **)&pkg, unmerge_averages);
if (pkg != NULL) {
pkg->cnt++;
pkg->time += elapsed;