From 82cf981df20512bb2f97a546a0750c46dd070fe8 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Fri, 17 Sep 2021 16:34:51 +0200 Subject: [PATCH] Add exit() at the end of programm --- src/utictactoe.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utictactoe.c b/src/utictactoe.c index 469f65f..c7e8168 100644 --- a/src/utictactoe.c +++ b/src/utictactoe.c @@ -104,7 +104,7 @@ int main(int argc, char* argv[]) { case 'c': if ( OPTIONAL_ARGUMENT_IS_PRESENT ) { - if ( access(optarg, F_OK) == 0) { + if ( access(optarg, R_OK) == 0) { printf("Contest file valid\n"); } else { @@ -138,4 +138,5 @@ int main(int argc, char* argv[]) { } } printf("Hello World!\n"); + return exit (EXIT_SUCCESS); }