From f06b1b816cc8e215eef0f16bc002ff78882072a5 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sun, 9 Nov 2008 21:41:08 +0000 Subject: [PATCH] NULL is equivalent to the default section in config_get() --- src/config.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/config.c b/src/config.c index a5f44ac..8e5a4e0 100644 --- a/src/config.c +++ b/src/config.c @@ -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 */