(unsigned char *)bv.bv_val,
bv.bv_len );
- if ( retcode == -1 || retcode > bv.bv_len ) {
+ if ( retcode == -1 || (unsigned) retcode > bv.bv_len ) {
fprintf( stderr, "Unable to parse value of general control %s\n",
control );
usage();
sctrlsp = sctrls;
}
- assert( nsctrls < sizeof(sctrls)/sizeof(sctrls[0]) );
+ assert( nsctrls < (int) (sizeof(sctrls)/sizeof(sctrls[0])) );
if ( authmethod == LDAP_AUTH_SASL ) {
#ifdef HAVE_CYRUS_SASL
ber_init2( ber, NULL, LBER_USE_DER );
- if ( ber_printf( ber, "s", proxydn ) == LBER_ERROR ) {
+ if ( ber_printf( ber, "s", proxydn ) == -1 ) {
exit( EXIT_FAILURE );
}
&sync_cookie );
}
- if ( err == LBER_ERROR ) {
+ if ( err == -1 ) {
ber_free( syncber, 1 );
fprintf( stderr, _("ldap sync control encoding error!\n") );
return EXIT_FAILURE;
}
- if ( ber_flatten( syncber, &syncbvalp ) == LBER_ERROR ) {
+ if ( ber_flatten( syncber, &syncbvalp ) == -1 ) {
return EXIT_FAILURE;
}
tool_write_ldif( LDIF_PUT_TEXT,
"text", line,
- next ? next - line : strlen( line ) );
+ next ? (size_t) (next - line) : strlen( line ));
line = next ? next + 1 : NULL;
}