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

@ -66,8 +66,7 @@ void game_mode_apply_renice(const GameModeContext *self, const pid_t client)
/*
* read configuration "renice" (1..20)
*/
long int renice = 0;
config_get_renice_value(config, &renice);
long int renice = config_get_renice_value(config);
if ((renice < 1) || (renice > 20)) {
LOG_ONCE(ERROR, "Configured renice value '%ld' is invalid, will not renice.\n", renice);
return;