diff options
| author | Federico Angelilli <code@fedang.net> | 2024-11-18 23:29:26 +0100 |
|---|---|---|
| committer | Federico Angelilli <code@fedang.net> | 2024-11-18 23:29:26 +0100 |
| commit | ca2cf9265e2030a9098f18315e3addde7f518192 (patch) | |
| tree | 52c4663887ad50cea1bbc44484300bb2dafacc9a /src/comet.c | |
| parent | 38637de243c569c0d6aaff455752e617c30c5866 (diff) | |
Refactor
Diffstat (limited to 'src/comet.c')
| -rw-r--r-- | src/comet.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/comet.c b/src/comet.c index 1522bf7..d5eb03f 100644 --- a/src/comet.c +++ b/src/comet.c @@ -71,7 +71,11 @@ int main(int argc, char **argv) if (config_file != NULL) { log_info("Reading config '%s'", config_path); - config_read(&config, config_file); + int errors = config_read(&config, config_file); + if (errors > 0) { + log_error("Config file contained %d errors", errors); + return EXIT_FAILURE; + } } signal(SIGINT, signal_quit); @@ -96,7 +100,12 @@ int main(int argc, char **argv) .height = config.height, }; - block_t *block = config_resolve(&config); + block_t *block = NULL; + if (config_resolve(&config, &block) > 0) { + log_error("Config could not be resolved"); + return EXIT_FAILURE; + } + log_debug("Starting bar"); window_resize(&window, config.width, config.height); |
