From 84b0693eeea348bbc23ea12e1b1b710102e41ef8 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sun, 23 May 1999 00:26:47 +0000 Subject: [PATCH] Remove empty else and other minor cleanup. --- servers/slapd/tools/ldbmcat.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/servers/slapd/tools/ldbmcat.c b/servers/slapd/tools/ldbmcat.c index bfdfffa983..39d165c6da 100644 --- a/servers/slapd/tools/ldbmcat.c +++ b/servers/slapd/tools/ldbmcat.c @@ -13,7 +13,6 @@ static void usage( char *name ) { fprintf( stderr, "usage: %s [-n] \n", name ); - exit( 1 ); } int @@ -34,6 +33,7 @@ main( int argc, char **argv ) if ( argc < 2 || argc > 3 || ( argc == 3 && strcmp( argv[1], "-n" ) != 0 )) { usage( argv[0] ); + return EXIT_FAILURE; } if ( argc == 3 && strcmp( argv[1], "-n" ) == 0 ) { printid = 0; @@ -44,7 +44,7 @@ main( int argc, char **argv ) if ( (dbp = ldbm_open( file, LDBM_READER, 0, 0 )) == NULL ) { perror( file ); - exit ( 1 ); + return EXIT_FAILURE; } #ifdef HAVE_BERKELEY_DB2 @@ -69,14 +69,10 @@ main( int argc, char **argv ) } ldbm_datum_free( dbp, data ); - - } else { - } } - ldbm_close( dbp ); - exit( 0 ); + ldbm_close( dbp ); - return 0; /* NOT REACHED */ + return EXIT_SUCCESS; } -- 2.39.5