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
This commit is contained in:
2
config.c
2
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));
|
||||
|
Reference in New Issue
Block a user