Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-07-17 03:42:52 +0300
committerJunio C Hamano <gitster@pobox.com>2021-07-17 03:42:53 +0300
commitbd4232fac3319890429ec303e2f7c3d287c8eaa3 (patch)
treeb5032aca9cdafb5812801f2868cabddc23e2052a /config.c
parent832a239b72779e97b09943d77b9097ed8376e18e (diff)
parentbc40dfb10a06612813a3f9b733d65af0732208b2 (diff)
Merge branch 'ab/struct-init'
Code cleanup around struct_type_init() functions. * ab/struct-init: string-list.h users: change to use *_{nodup,dup}() string-list.[ch]: add a string_list_init_{nodup,dup}() dir.[ch]: replace dir_init() with DIR_INIT *.c *_init(): define in terms of corresponding *_INIT macro *.h: move some *_INIT to designated initializers
Diffstat (limited to 'config.c')
-rw-r--r--config.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/config.c b/config.c
index 55313fcf44..c4dcb40b47 100644
--- a/config.c
+++ b/config.c
@@ -2073,7 +2073,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));