refactor fatal_exit()
This commit is contained in:
parent
268dd34612
commit
b595a19af6
1 changed files with 3 additions and 5 deletions
|
@ -2,12 +2,10 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
void fatal_exit( char* error, char* advice ) {
|
||||
if ( error[ 0 ] == '\0' ) {
|
||||
fprintf( stderr, "FATAL ERROR, exit.\n" );
|
||||
exit( 1 );
|
||||
}
|
||||
fprintf( stderr, "FATAL ERROR, exit.\n" );
|
||||
|
||||
fprintf( stderr, "FATAL ERROR, exit.\n - %s\n", error );
|
||||
if ( error[ 0 ] != '\0' )
|
||||
fprintf( stderr, " - %s\n", error );
|
||||
|
||||
if ( advice[ 0 ] != '\0' )
|
||||
fprintf( stderr, " - %s\n", advice );
|
||||
|
|
Loading…
Reference in a new issue