Allow NULL for the default section in config_set()
This commit is contained in:
parent
3edc0e83cf
commit
fd66f28700
|
@ -80,6 +80,8 @@ int config_set(Config * config, char const * section, char const * variable,
|
||||||
char * q;
|
char * q;
|
||||||
char * v = NULL;
|
char * v = NULL;
|
||||||
|
|
||||||
|
if(section == NULL)
|
||||||
|
section = "";
|
||||||
if((hash = hash_get(config, section)) == NULL)
|
if((hash = hash_get(config, section)) == NULL)
|
||||||
{
|
{
|
||||||
/* create a new section */
|
/* create a new section */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user