diff --git a/frontend/frontend_driver.c b/frontend/frontend_driver.c index 66683e4821..bb114ee15f 100644 --- a/frontend/frontend_driver.c +++ b/frontend/frontend_driver.c @@ -105,16 +105,7 @@ frontend_ctx_driver_t *frontend_ctx_find_driver(const char *ident) **/ frontend_ctx_driver_t *frontend_ctx_init_first(void) { - unsigned i; - frontend_ctx_driver_t *frontend = NULL; - - for (i = 0; frontend_ctx_drivers[i]; i++) - { - frontend = frontend_ctx_drivers[i]; - break; - } - - return frontend; + return frontend_ctx_drivers[0]; } bool frontend_driver_get_core_extension(char *s, size_t len) diff --git a/gfx/video_shader_driver.c b/gfx/video_shader_driver.c index 160cfe17bc..e2422c25b2 100644 --- a/gfx/video_shader_driver.c +++ b/gfx/video_shader_driver.c @@ -138,14 +138,8 @@ bool video_shader_driver_deinit(void) /* Finds first suitable shader context driver. */ bool video_shader_driver_init_first(void) { - unsigned i; - - for (i = 0; shader_ctx_drivers[i]; i++) - { - current_shader = shader_ctx_drivers[i]; - return true; - } - return false; + current_shader = shader_ctx_drivers[0]; + return true; } bool video_shader_driver_init(video_shader_ctx_init_t *init) diff --git a/ui/ui_companion_driver.c b/ui/ui_companion_driver.c index 980d2311fa..78832a4f42 100644 --- a/ui/ui_companion_driver.c +++ b/ui/ui_companion_driver.c @@ -91,12 +91,7 @@ bool ui_companion_is_on_foreground(void) **/ const ui_companion_driver_t *ui_companion_init_first(void) { - unsigned i; - - for (i = 0; ui_companion_drivers[i]; i++) - return ui_companion_drivers[i]; - - return NULL; + return ui_companion_drivers[0]; } const ui_companion_driver_t *ui_companion_get_ptr(void)