Skip to content

Commit 2ae61d2

Browse files
committed
EXIT_FAILURE by default
1 parent 28f5ae3 commit 2ae61d2

9 files changed

+10
-10
lines changed

prodScreen_buttonsTest.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ int launch_prod_screen_buttons(int argc, char *argv[]){
2222
SDL_Rect text_pos;
2323
SDL_Event event;
2424
int stop_menu_loop = 0;
25-
int res = 2; // 2=FAIL
25+
int res = EXIT_FAILURE;
2626
int render = 0;
2727
int time_left = time_left_FAIL;
2828
int prev_ms = 0;
@@ -195,7 +195,7 @@ int launch_prod_screen_buttons(int argc, char *argv[]){
195195

196196
/* Print not touched buttons if time_left */
197197
if(!time_left){
198-
res = 2;
198+
res = ERROR_MANUAL_FAIL;
199199

200200
printf(" Missing Keys: ");
201201
for (i = 0; i < NB_KEYS; i++){

prodScreen_displayTest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ int launch_prod_screen_display(int argc, char *argv[]){
99
int stop_menu_loop = 0;
1010
int timeout = 31;
1111
int prev_ms = 0;
12-
int res = ERROR_MANUAL_FAIL;
12+
int res = EXIT_FAILURE;
1313

1414
/* Main loop */
1515
while (!stop_menu_loop && timeout)

prodScreen_failScreen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ static int wait_event_loop(){
66

77
SDL_Event event;
88
int stop_menu_loop = 0;
9-
int res = 0;
9+
int res = EXIT_FAILURE;
1010

1111
/// -------- Main loop ---------
1212
while (!stop_menu_loop)

prodScreen_ledTest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ static int wait_event_loop(){
55

66
SDL_Event event;
77
int stop_menu_loop = 0;
8-
int res = 0;
8+
int res = EXIT_FAILURE;
99

1010
/// -------- Main loop ---------
1111
while (!stop_menu_loop)

prodScreen_magnetTest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ void handle_sigusr1(int sig)
1515
static int wait_event_loop(){
1616

1717
SDL_Event event;
18-
int res = 0;
18+
int res = EXIT_FAILURE;
1919

2020
/// -------- Main loop ---------
2121
while (!stop_menu_loop)

prodScreen_showImage.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ int launch_prod_screen_showImage(int argc, char *argv[]){
5757
SDL_Event event;
5858
SDL_Surface *text_surface = NULL;
5959
SDL_Rect text_pos;
60-
int res = 0;
60+
int res = EXIT_FAILURE;
6161
int stop_menu_loop = 0;
6262

6363
/* Load Img */

prodScreen_speakerTest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ static int wait_event_loop(){
66

77
SDL_Event event;
88
int stop_menu_loop = 0;
9-
int res = 0;
9+
int res = EXIT_FAILURE;
1010

1111
/// -------- Main loop ---------
1212
while (!stop_menu_loop)

prodScreen_validation.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ static int wait_event_loop(){
66

77
SDL_Event event;
88
int stop_menu_loop = 0;
9-
int res = 0;
9+
int res = EXIT_FAILURE;
1010

1111
/// -------- Main loop ---------
1212
while (!stop_menu_loop)

prodScreen_waitBattery.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
static int is_battery_present(){
1111
char buf[10];
1212
FILE *fp;
13-
int res = 0;
13+
int res = EXIT_FAILURE;
1414

1515
/* Read battery file */
1616
if ((fp = fopen(BATTERY_PRESENT_FILE, "r")) == NULL) {

0 commit comments

Comments
 (0)