diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2021-07-01 10:51:29 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-07-01 19:32:22 (GMT) |
commit | bc40dfb10a06612813a3f9b733d65af0732208b2 (patch) | |
tree | 5b8b6a53a70365d72762b7181ed4bb108e6ffea4 /config.c | |
parent | 770fedaf9fb156bd8c18da41770eac0cb63fba63 (diff) | |
download | git-bc40dfb10a06612813a3f9b733d65af0732208b2.zip git-bc40dfb10a06612813a3f9b733d65af0732208b2.tar.gz git-bc40dfb10a06612813a3f9b733d65af0732208b2.tar.bz2 |
string-list.h users: change to use *_{nodup,dup}()
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 <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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)); |