mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-26 07:57:59 -04:00
config: don't log a NULL path
This commit is contained in:
parent
d405c7022f
commit
ca5e693524
1 changed files with 2 additions and 2 deletions
4
config.c
4
config.c
|
|
@ -455,8 +455,6 @@ config_load(struct config *conf)
|
||||||
};
|
};
|
||||||
|
|
||||||
char *path = get_config_path();
|
char *path = get_config_path();
|
||||||
LOG_INFO("loading configuration from %s", path);
|
|
||||||
|
|
||||||
if (path == NULL) {
|
if (path == NULL) {
|
||||||
/* Default conf */
|
/* Default conf */
|
||||||
LOG_WARN("no configuration found, using defaults");
|
LOG_WARN("no configuration found, using defaults");
|
||||||
|
|
@ -464,6 +462,8 @@ config_load(struct config *conf)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LOG_INFO("loading configuration from %s", path);
|
||||||
|
|
||||||
FILE *f = fopen(path, "r");
|
FILE *f = fopen(path, "r");
|
||||||
if (f == NULL) {
|
if (f == NULL) {
|
||||||
LOG_ERR("%s: failed to open", path);
|
LOG_ERR("%s: failed to open", path);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue