BUG correction in wait battery: EXIT_FAILURE for the wrong res, causing test to suceed all the time

This commit is contained in:
busebusemac 2020-09-11 15:15:55 +02:00
parent 2ae61d2bac
commit db31a5c978

View File

@ -10,7 +10,7 @@
static int is_battery_present(){ static int is_battery_present(){
char buf[10]; char buf[10];
FILE *fp; FILE *fp;
int res = EXIT_FAILURE; int res = 0;
/* Read battery file */ /* Read battery file */
if ((fp = fopen(BATTERY_PRESENT_FILE, "r")) == NULL) { if ((fp = fopen(BATTERY_PRESENT_FILE, "r")) == NULL) {
@ -34,7 +34,7 @@ static int wait_event_loop(){
SDL_Event event; SDL_Event event;
int stop_menu_loop = 0; int stop_menu_loop = 0;
int prev_ms = 0; int prev_ms = 0;
int res = ERROR_MANUAL_FAIL; int res = EXIT_FAILURE;
/// -------- Main loop --------- /// -------- Main loop ---------
while (!stop_menu_loop) while (!stop_menu_loop)