1.1 --- a/src/server.c Tue Aug 28 14:03:09 2018 +0200 1.2 +++ b/src/server.c Tue Aug 28 14:16:30 2018 +0200 1.3 @@ -75,31 +75,31 @@ 1.4 int result = read_pgn(pgnfile, &continuegame, 1.5 &(settings->gameinfo)); 1.6 fclose(pgnfile); 1.7 - if (result != EXIT_SUCCESS) { 1.8 + if (result) { 1.9 addstr("Invalid PGN file content.\n"); 1.10 - return EXIT_FAILURE; 1.11 + return 1; 1.12 } 1.13 if (!is_game_running(&continuegame)) { 1.14 addstr("Game has ended. Use -S to analyze it.\n"); 1.15 - return EXIT_FAILURE; 1.16 + return 1; 1.17 } 1.18 addch('\n'); 1.19 dump_moveinfo(&continuegame); 1.20 addch('\n'); 1.21 } else { 1.22 printw("Can't read PGN file (%s)\n", strerror(errno)); 1.23 - return EXIT_FAILURE; 1.24 + return 1; 1.25 } 1.26 } 1.27 1.28 if (server_open(&server, settings->port)) { 1.29 net_destroy(&server); 1.30 - return EXIT_FAILURE; 1.31 + return 1; 1.32 } 1.33 1.34 if (server_handshake(server.client)) { 1.35 net_destroy(&server); 1.36 - return EXIT_FAILURE; 1.37 + return 1; 1.38 } 1.39 1.40 int fd = server.client->fd; 1.41 @@ -157,9 +157,9 @@ 1.42 clrtoeol(); 1.43 1.44 net_destroy(&server); 1.45 - return EXIT_FAILURE; 1.46 + return 1; 1.47 } 1.48 1.49 net_destroy(&server); 1.50 - return EXIT_SUCCESS; 1.51 + return 0; 1.52 }