Warning cleanup: signed meets unsigned. ber_printf() returns -1 on

error, not LBER_ERROR.
This commit is contained in:
Hallvard Furuseth 2008-10-13 08:09:52 +00:00
parent 3b90f84422
commit f40582fc7d
2 changed files with 6 additions and 6 deletions

View File

@ -625,7 +625,7 @@ tool_args( int argc, char **argv )
(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();
@ -1310,7 +1310,7 @@ tool_bind( LDAP *ld )
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
@ -1523,7 +1523,7 @@ tool_server_controls( LDAP *ld, LDAPControl *extra_c, int count )
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 );
}

View File

@ -856,13 +856,13 @@ getNextPage:
&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;
}
@ -1618,7 +1618,7 @@ static int print_result(
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;
}