mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Clean error handling
This commit is contained in:
parent
d2b9a4913b
commit
d779da4410
@ -241,18 +241,11 @@ static int docompare(
|
||||
rc = ldap_compare_ext_s( ld, dn, attr, bvalue,
|
||||
sctrls, cctrls );
|
||||
|
||||
if ( rc == -1 ) {
|
||||
ldap_perror( ld, "ldap_result" );
|
||||
return( rc );
|
||||
}
|
||||
|
||||
/* if we were told to be quiet, use the return value. */
|
||||
if ( !quiet ) {
|
||||
if ( rc == LDAP_COMPARE_TRUE ) {
|
||||
rc = 0;
|
||||
printf(_("TRUE\n"));
|
||||
} else if ( rc == LDAP_COMPARE_FALSE ) {
|
||||
rc = 0;
|
||||
printf(_("FALSE\n"));
|
||||
} else {
|
||||
ldap_perror( ld, "ldap_compare" );
|
||||
|
Loading…
Reference in New Issue
Block a user