/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2010 The OpenLDAP Foundation.
+ * Copyright 1998-2014 The OpenLDAP Foundation.
* Portions Copyright 1998-2003 Kurt D. Zeilenga.
* Portions Copyright 2003 IBM Corporation.
* All rights reserved.
break;
case SLAPTEST:
- options = " [-n databasenumber] [-u]\n";
+ options = " [-n databasenumber] [-u] [-Q]\n";
break;
case SLAPSCHEMA:
if ( strcasecmp( p, "no" ) == 0 ) {
ldif_wrap = LDIF_LINE_WIDTH_MAX;
- } else if ( lutil_atou( &ldif_wrap, p ) ) {
- Debug( LDAP_DEBUG_ANY, "unable to parse ldif-wrap=\"%s\".\n", p, 0, 0 );
- return -1;
+ } else {
+ unsigned int u;
+ if ( lutil_atou( &u, p ) ) {
+ Debug( LDAP_DEBUG_ANY, "unable to parse ldif-wrap=\"%s\".\n", p, 0, 0 );
+ return -1;
+ }
+ ldif_wrap = (ber_len_t)u;
}
break;
} break;
case 'j': /* jump to linenumber */
- if ( lutil_atoi( &jumpline, optarg ) ) {
+ if ( lutil_atoul( &jumpline, optarg ) ) {
usage( tool, progname );
}
break;
ber_memfree( nbase.bv_val );
BER_BVZERO( &nbase );
+ if( be == NULL ) {
+ fprintf( stderr, "%s: slap_init no backend for \"%s\"\n",
+ progname, base.bv_val );
+ exit( EXIT_FAILURE );
+ }
switch ( tool ) {
case SLAPACL:
goto startup;
break;
}
- if( be == NULL ) {
- fprintf( stderr, "%s: slap_init no backend for \"%s\"\n",
- progname, base.bv_val );
- exit( EXIT_FAILURE );
- }
/* If the named base is a glue master, operate on the
* entire context
*/