From bc40dfb10a06612813a3f9b733d65af0732208b2 Mon Sep 17 00:00:00 2001 From: Ævar Arnfjörð Bjarmason Date: Thu, 1 Jul 2021 12:51:29 +0200 Subject: string-list.h users: change to use *_{nodup,dup}() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change all in-tree users of the string_list_init(LIST, BOOL) API to use string_list_init_{nodup,dup}(LIST) instead. As noted in the preceding commit let's leave the now-unused string_list_init() wrapper in-place for any in-flight users, it can be removed at some later date. Signed-off-by: Ævar Arnfjörð Bjarmason Signed-off-by: Junio C Hamano --- config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config.c') diff --git a/config.c b/config.c index f9c400ad30..2edb282b43 100644 --- a/config.c +++ b/config.c @@ -2072,7 +2072,7 @@ static int configset_add_value(struct config_set *cs, const char *key, const cha e = xmalloc(sizeof(*e)); hashmap_entry_init(&e->ent, strhash(key)); e->key = xstrdup(key); - string_list_init(&e->value_list, 1); + string_list_init_dup(&e->value_list); hashmap_add(&cs->config_hash, &e->ent); } si = string_list_append_nodup(&e->value_list, xstrdup_or_null(value)); -- cgit v1.3