aboutsummaryrefslogtreecommitdiff
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 /qkeyword.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 'qkeyword.c')
-rw-r--r--qkeyword.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/qkeyword.c b/qkeyword.c
index 5bc10108..4899d47a 100644
--- a/qkeyword.c
+++ b/qkeyword.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 2006 Thomas A. Cort - <tcort@gentoo.org>
@@ -913,8 +913,8 @@ int qkeyword_main(int argc, char **argv)
continue;
bucket = xzalloc(sizeof(array_t));
xarraypush_ptr(bucket, atom);
- ebuck = add_set_value(atom_format("%[CAT]%[PN]", atom),
- bucket, pmasks);
+ pmasks = add_set_value(atom_format("%[CAT]%[PN]", atom),
+ bucket, (void **)&ebuck, pmasks);
if (ebuck != NULL) {
xarraypush_ptr(ebuck, atom);
xarrayfree_int(bucket);