#include "portable.h"
#include <stdio.h>
-#include <stdlib.h>
+#include <ac/stdlib.h>
#include <ac/ctype.h>
#include <ac/string.h>
}
if ( obuf != NULL ) {
fputs( obuf, ofp );
- free( obuf );
+ ber_memfree( obuf );
}
}
if ( modtype != 0 ) {
break;
default:
usage( progname );
- exit( 1 );
+ exit( EXIT_FAILURE );
}
}
if (( dn_suffix == NULL ) || ( nreplicas == 0 )) {
usage( progname );
- exit( 1 );
+ exit( EXIT_FAILURE );
}
if ( ofile == NULL ) {
if (( std_ps = ps_alloc( std_open )) == NULLPS ||
std_setup( std_ps, ofp ) != OK ) {
fprintf( stderr, "std_ps setup failed - help!\n" );
- exit( 1 );
+ exit( EXIT_FAILURE );
}
if (( rps = ps_alloc( str_open )) == NULLPS ||
str_setup( rps, NULLCP, 0, 0 ) != OK ) {
fprintf( stderr, "rps setup failed - help!\n" );
- exit( 1 );
+ exit( EXIT_FAILURE );
}
if ( ofile != NULL ) {
if (( ofp = lock_fopen( ofile, "a", &lfp )) == NULL ) {
perror( "open" );
- exit( 1 );
+ exit( EXIT_FAILURE );
}
}
/*
sprintf( nbuf, "%s.lock", ofile );
(void) unlink( nbuf );
}
- exit( 0 );
+ exit( EXIT_SUCCESS );
}