config: don't log a NULL path

This commit is contained in:
Daniel Eklöf 2019-08-12 19:31:21 +02:00
parent d405c7022f
commit ca5e693524
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -455,8 +455,6 @@ config_load(struct config *conf)
};
char *path = get_config_path();
LOG_INFO("loading configuration from %s", path);
if (path == NULL) {
/* Default conf */
LOG_WARN("no configuration found, using defaults");
@ -464,6 +462,8 @@ config_load(struct config *conf)
goto out;
}
LOG_INFO("loading configuration from %s", path);
FILE *f = fopen(path, "r");
if (f == NULL) {
LOG_ERR("%s: failed to open", path);