+/* $OpenLDAP$ */
/*
* Copyright (c) 1995 Regents of the University of Michigan.
* All rights reserved.
} else if (( always_addvals = read_file( optarg, &always_addlen ))
== NULL ) {
print_err( optarg );
- exit( 1 );
+ exit( EXIT_FAILURE );
}
break;
}
if ( file_attr_directory == NULL ) {
print_err( "malloc" );
- exit( 1 );
+ exit( EXIT_FAILURE );
}
#else /* HAVE_FILE_ATTR_DIR */
fprintf( stderr, "Ignoring -f: this option requires a newer version of ISODE.\n" );
}
if ( ignore_attr == NULL ) {
print_err( "malloc/realloc" );
- exit( 1 );
+ exit( EXIT_FAILURE );
}
ignore_attr[ ignore_count ] = optarg;
ignore_attr[ ++ignore_count ] = NULL;
if ( errflg ) {
fprintf( stderr, usage, progname );
- exit( 1 );
+ exit( EXIT_FAILURE );
}
if ( basedn == NULL ) {
if ( init_syntaxes() < 0 ) {
fprintf( stderr, "%s: init_syntaxes failed -- check your oid tables \n",
progname );
- exit( 1 );
+ exit( EXIT_FAILURE );
}
fprintf( stderr, "edb2ldif: exit( %d )\n", ( rc < 0 ) ? 1 : 0 );
#endif
- exit( ( rc < 0 ) ? 1 : 0 );
+ exit( ( rc < 0 ) ? EXIT_FAILURE : EXIT_SUCCESS );
}
#endif
if ( errno > sys_nerr ) {
- fprintf( stderr, "%s: %s: error %d\n", progname, msg, errno );
+ fprintf( stderr, "%s: %s: errno=%d\n", progname, msg, errno );
} else {
fprintf( stderr, "%s: %s: %s\n", progname, msg, sys_errlist[ errno ] );
}