U-Boot menu framework(common/menu.c) returns 1 if it is successful,
returns negative value if it fails.
Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
}
for (iter = bootmenu->first; iter; iter = iter->next) {
- if (!menu_item_add(menu, iter->key, iter))
+ if (menu_item_add(menu, iter->key, iter) != 1)
goto cleanup;
}
init = 1;
- if (menu_get_choice(menu, &choice)) {
+ if (menu_get_choice(menu, &choice) == 1) {
iter = choice;
title = strdup(iter->title);
command = strdup(iter->command);