Cleanup logging, comments and files

This commit is contained in:
Tobias Reisinger 2020-11-19 18:36:03 +01:00
parent 2fe784dd78
commit 3f11431df6
4 changed files with 4 additions and 7 deletions

View file

@ -200,6 +200,7 @@ config_init()
{
global_config = calloc(1, sizeof(config_t));
config_load_string(&global_config->database, DEFAULT_DATABASE_PATH);
global_config->ports.discovery = DEFAULT_DISCOVERY_PORT;
global_config->ports.mqtt = DEFAULT_MQTT_PORT;
@ -254,12 +255,10 @@ config_try_file(const char *path)
{
if(access(path, F_OK) != 0)
{
LOGGER_DEBUG("'%s' does not exist\n", path);
return 1;
}
if(access(path, R_OK) != 0)
{
LOGGER_DEBUG("no read access for '%s'\n", path);
return 1;
}
return 0;
@ -378,7 +377,5 @@ config_load_directory(config_t *config, const char *directory_name)
free(path);
}
// Close directory and exit.
closedir(directory);
}