}
rc = ldap_result( ld, LDAP_RES_ANY, LDAP_MSG_ALL, NULL, &res );
- if ( rc != LDAP_SUCCESS ) {
- fprintf( stderr, "ldapdelete: ldap_result: %s (%d)\n",
- ldap_err2string( rc ), rc );
+ if ( rc < 0 ) {
+ ldap_perror( ld, "ldapdelete: ldap_result" );
return rc;
}
}
rc = ldap_result( ld, LDAP_RES_ANY, LDAP_MSG_ALL, NULL, &res );
- if ( rc != LDAP_SUCCESS ) {
- fprintf( stderr, "ldapmodrdn: ldap_result: %s (%d)\n",
- ldap_err2string( rc ), rc );
+ if ( rc < 0 ) {
+ ldap_perror( ld, "ldapmodrdn: ldap_result" );
return rc;
}
}
rc = ldap_result( ld, LDAP_RES_ANY, LDAP_MSG_ALL, NULL, &res );
- if ( rc != LDAP_SUCCESS ) {
- ldap_perror( ld, "ldap_result" );
+ if ( rc < 0 ) {
+ ldap_perror( ld, "ldappasswd: ldap_result" );
return rc;
}
ber_memfree( text );
ber_memfree( matcheddn );
- ber_memvfree( refs );
+ ber_memvfree( (void **) refs );
ber_memfree( retoid );
ber_bvfree( retdata );