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

@ -102,8 +102,7 @@ void game_mode_apply_ioprio(const GameModeContext *self, const pid_t client)
/*
* read configuration "ioprio" (0..7)
*/
int ioprio = 0;
config_get_ioprio_value(config, &ioprio);
int ioprio = (int)config_get_ioprio_value(config);
if (IOPRIO_RESET_DEFAULT == ioprio) {
LOG_MSG("IO priority will be reset to default behavior (based on CPU priority).\n");
ioprio = 0;