From ae60c15ebbdfb3cd6105f9564a55c527af382962 Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Sun, 29 Nov 2015 20:56:10 +1000 Subject: [PATCH] * parse_config() : add assert()s --- src/config.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/config.c b/src/config.c index 2d31a00..30f80e5 100644 --- a/src/config.c +++ b/src/config.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -15,6 +16,9 @@ int parse_config(oal_config_t * const config, const char *file) { char *key, *value; size_t valsize; + assert(config != NULL); + assert(file != NULL); + if ((f = fopen(file, "r")) == NULL) { snprintf(err, bufsize, "can't open file: %s", strerror(errno)); config->error = strndup(err, bufsize);