From fd66f28700d958500910ead23686a00095c7a441 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Tue, 25 May 2010 13:45:37 +0000 Subject: [PATCH] Allow NULL for the default section in config_set() --- src/config.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/config.c b/src/config.c index b9b5907..39ed983 100644 --- a/src/config.c +++ b/src/config.c @@ -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 */