diff -r 7ba8a97a8b6e -r 3fa1de896666 src/server.c --- a/src/server.c Tue Aug 28 14:03:09 2018 +0200 +++ b/src/server.c Tue Aug 28 14:16:30 2018 +0200 @@ -75,31 +75,31 @@ int result = read_pgn(pgnfile, &continuegame, &(settings->gameinfo)); fclose(pgnfile); - if (result != EXIT_SUCCESS) { + if (result) { addstr("Invalid PGN file content.\n"); - return EXIT_FAILURE; + return 1; } if (!is_game_running(&continuegame)) { addstr("Game has ended. Use -S to analyze it.\n"); - return EXIT_FAILURE; + return 1; } addch('\n'); dump_moveinfo(&continuegame); addch('\n'); } else { printw("Can't read PGN file (%s)\n", strerror(errno)); - return EXIT_FAILURE; + return 1; } } if (server_open(&server, settings->port)) { net_destroy(&server); - return EXIT_FAILURE; + return 1; } if (server_handshake(server.client)) { net_destroy(&server); - return EXIT_FAILURE; + return 1; } int fd = server.client->fd; @@ -157,9 +157,9 @@ clrtoeol(); net_destroy(&server); - return EXIT_FAILURE; + return 1; } net_destroy(&server); - return EXIT_SUCCESS; + return 0; }