NULL is equivalent to the default section in config_get()

This commit is contained in:
Pierre Pronchery 2008-11-09 21:41:08 +00:00
parent 196e5875d3
commit f06b1b816c

View File

@ -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 */