menu: Update bootmenu_autoboot_loop() to return the code

Use the return value to save having to pass around a pointer. This also
resolves any ambiguity about what *key contains when the function is
called.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2023-01-06 08:52:23 -06:00
committed by Tom Rini
parent 2da4a15e7e
commit 5712976b26
3 changed files with 13 additions and 12 deletions

View File

@@ -93,7 +93,7 @@ static char *bootmenu_choice_entry(void *data)
while (1) {
if (menu->delay >= 0) {
/* Autoboot was not stopped */
bootmenu_autoboot_loop(menu, &key, &esc);
key = bootmenu_autoboot_loop(menu, &esc);
} else {
/* Some key was pressed, so autoboot was stopped */
bootmenu_loop(menu, &key, &esc);