From: Kurt Zeilenga Date: Sun, 23 May 1999 00:26:47 +0000 (+0000) Subject: Remove empty else and other minor cleanup. X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~15 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=84b0693eeea348bbc23ea12e1b1b710102e41ef8;p=openldap Remove empty else and other minor cleanup. --- 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; }