NULL is equivalent to the default section in config_get()
This commit is contained in:
parent
196e5875d3
commit
f06b1b816c
|
@ -72,6 +72,8 @@ char const * config_get(Config * config, char const * section,
|
|||
Hash * h;
|
||||
char const * value;
|
||||
|
||||
if(section == NULL)
|
||||
section = "";
|
||||
if((h = hash_get(config, section)) != NULL) /* found section */
|
||||
{
|
||||
if((value = hash_get(h, variable)) != NULL) /* found value */
|
||||
|
|
Loading…
Reference in New Issue
Block a user