From 8fef8185237b1acb8e2f45b3ee46a1386e340e9d Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Wed, 28 Jun 2017 19:43:15 +0200 Subject: allow source config keys without value --- src/blogc/source-parser.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/blogc/source-parser.c b/src/blogc/source-parser.c index 65ba982..cabc033 100644 --- a/src/blogc/source-parser.c +++ b/src/blogc/source-parser.c @@ -111,9 +111,10 @@ blogc_source_parse(const char *src, size_t src_len, bc_error_t **err) start = current; break; } - *err = bc_error_parser(BLOGC_ERROR_SOURCE_PARSER, src, src_len, - current, "Configuration value not provided for '%s'.", - key); + bc_trie_insert(rv, key, bc_strdup("")); + free(key); + key = NULL; + state = SOURCE_START; break; case SOURCE_CONFIG_VALUE: -- cgit v1.2.3-18-g5258