From e2ebb44db31d4e0e9bfc0a9974d36eff63c8b2b1 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Tue, 7 Feb 2023 09:08:13 +0100 Subject: 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 --- qkeyword.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'qkeyword.c') diff --git a/qkeyword.c b/qkeyword.c index 5bc1010..4899d47 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 - @@ -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); -- cgit v1.2.3-65-gdbad