Refactor config functions that can return their full value to do so

This pattern got a little out of hand, and was only meant for variable length values like strings
This commit is contained in:
Marc Di Luzio
2019-02-09 14:52:07 +00:00
parent d17d682082
commit b7dff4265c
6 changed files with 65 additions and 47 deletions

View File

@@ -549,8 +549,7 @@ static void *game_mode_context_reaper(void *userdata)
/* Stack, not allocated, won't disappear. */
GameModeContext *self = userdata;
long reaper_interval = 0.0f;
config_get_reaper_thread_frequency(self->config, &reaper_interval);
long reaper_interval = config_get_reaper_thread_frequency(self->config);
struct timespec ts = { 0, 0 };
ts.tv_sec = time(NULL) + reaper_interval;