From e67b6382c73d7a09e4ddfd14f54de1a8084d91a1 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Mon, 4 Jul 2011 10:39:00 +0200 Subject: [PATCH] explicit exit codes --- star.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/star.c b/star.c index 2d7fd11..e88e005 100644 --- a/star.c +++ b/star.c @@ -510,7 +510,7 @@ int parse_args( int argc, char* argv[], struct options *o, struct state *s ) switch(c) { case 'h' : printf( "%s\n", help_text ); - exit(0); + exit( EXIT_SUCCESS ); case 'b' : o->black_and_white = 1; break; @@ -526,7 +526,7 @@ int parse_args( int argc, char* argv[], struct options *o, struct state *s ) break; case '?' : case ':' : - exit( 0 ); + exit( EXIT_SUCCESS ); default : break; } } @@ -555,7 +555,7 @@ int main( int argc, char* argv[] ) struct options *o = malloc( sizeof( struct options ) ); if ( s == NULL || o == NULL ) { - exit( 1 ); /* Guys, we're out of memory */ + exit( EXIT_FAILURE ); /* Guys, we're out of memory */ } /* trick to count how many levels we have */