]> git.sur5r.net Git - openldap/commitdiff
Remove empty else and other minor cleanup.
authorKurt Zeilenga <kurt@openldap.org>
Sun, 23 May 1999 00:26:47 +0000 (00:26 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sun, 23 May 1999 00:26:47 +0000 (00:26 +0000)
servers/slapd/tools/ldbmcat.c

index bfdfffa98374bcf595bee28aaf3a528cd9b7d4e3..39d165c6daaeda0d03e6129b533545d963235e97 100644 (file)
@@ -13,7 +13,6 @@ static void
 usage( char *name )
 {
         fprintf( stderr, "usage: %s [-n] <filename>\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;
 }