EXIT_FAILURE by default

This commit is contained in:
busebusemac 2020-09-11 14:32:06 +02:00
parent 28f5ae37f7
commit 2ae61d2bac
9 changed files with 10 additions and 10 deletions

View File

@ -22,7 +22,7 @@ int launch_prod_screen_buttons(int argc, char *argv[]){
SDL_Rect text_pos; SDL_Rect text_pos;
SDL_Event event; SDL_Event event;
int stop_menu_loop = 0; int stop_menu_loop = 0;
int res = 2; // 2=FAIL int res = EXIT_FAILURE;
int render = 0; int render = 0;
int time_left = time_left_FAIL; int time_left = time_left_FAIL;
int prev_ms = 0; int prev_ms = 0;
@ -195,7 +195,7 @@ int launch_prod_screen_buttons(int argc, char *argv[]){
/* Print not touched buttons if time_left */ /* Print not touched buttons if time_left */
if(!time_left){ if(!time_left){
res = 2; res = ERROR_MANUAL_FAIL;
printf(" Missing Keys: "); printf(" Missing Keys: ");
for (i = 0; i < NB_KEYS; i++){ for (i = 0; i < NB_KEYS; i++){

View File

@ -9,7 +9,7 @@ int launch_prod_screen_display(int argc, char *argv[]){
int stop_menu_loop = 0; int stop_menu_loop = 0;
int timeout = 31; int timeout = 31;
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 && timeout) while (!stop_menu_loop && timeout)

View File

@ -6,7 +6,7 @@ static int wait_event_loop(){
SDL_Event event; SDL_Event event;
int stop_menu_loop = 0; int stop_menu_loop = 0;
int res = 0; int res = EXIT_FAILURE;
/// -------- Main loop --------- /// -------- Main loop ---------
while (!stop_menu_loop) while (!stop_menu_loop)

View File

@ -5,7 +5,7 @@ static int wait_event_loop(){
SDL_Event event; SDL_Event event;
int stop_menu_loop = 0; int stop_menu_loop = 0;
int res = 0; int res = EXIT_FAILURE;
/// -------- Main loop --------- /// -------- Main loop ---------
while (!stop_menu_loop) while (!stop_menu_loop)

View File

@ -15,7 +15,7 @@ void handle_sigusr1(int sig)
static int wait_event_loop(){ static int wait_event_loop(){
SDL_Event event; SDL_Event event;
int res = 0; int res = EXIT_FAILURE;
/// -------- Main loop --------- /// -------- Main loop ---------
while (!stop_menu_loop) while (!stop_menu_loop)

View File

@ -57,7 +57,7 @@ int launch_prod_screen_showImage(int argc, char *argv[]){
SDL_Event event; SDL_Event event;
SDL_Surface *text_surface = NULL; SDL_Surface *text_surface = NULL;
SDL_Rect text_pos; SDL_Rect text_pos;
int res = 0; int res = EXIT_FAILURE;
int stop_menu_loop = 0; int stop_menu_loop = 0;
/* Load Img */ /* Load Img */

View File

@ -6,7 +6,7 @@ static int wait_event_loop(){
SDL_Event event; SDL_Event event;
int stop_menu_loop = 0; int stop_menu_loop = 0;
int res = 0; int res = EXIT_FAILURE;
/// -------- Main loop --------- /// -------- Main loop ---------
while (!stop_menu_loop) while (!stop_menu_loop)

View File

@ -6,7 +6,7 @@ static int wait_event_loop(){
SDL_Event event; SDL_Event event;
int stop_menu_loop = 0; int stop_menu_loop = 0;
int res = 0; int res = EXIT_FAILURE;
/// -------- Main loop --------- /// -------- Main loop ---------
while (!stop_menu_loop) while (!stop_menu_loop)

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 = 0; int res = EXIT_FAILURE;
/* Read battery file */ /* Read battery file */
if ((fp = fopen(BATTERY_PRESENT_FILE, "r")) == NULL) { if ((fp = fopen(BATTERY_PRESENT_FILE, "r")) == NULL) {