Allow NULL for the default section in config_set()

This commit is contained in:
Pierre Pronchery 2010-05-25 13:45:37 +00:00
parent 3edc0e83cf
commit fd66f28700

View File

@ -80,6 +80,8 @@ int config_set(Config * config, char const * section, char const * variable,
char * q;
char * v = NULL;
if(section == NULL)
section = "";
if((hash = hash_get(config, section)) == NULL)
{
/* create a new section */