Added a null-safe strdup variant

This commit is contained in:
Martin Willi
2011-01-05 16:46:02 +01:00
parent b0892d094c
commit 1038d9fee5
7 changed files with 13 additions and 8 deletions
+1 -1
View File
@@ -127,7 +127,7 @@ static section_t *section_create(char *name)
{
section_t *this;
INIT(this,
.name = name ? strdup(name) : NULL,
.name = strdupnull(name),
.sections = linked_list_create(),
.kv = linked_list_create(),
);