mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
Correct improper ldap_result() result checking...
This commit is contained in:
parent
20e6dcec3b
commit
f6cda93bd1
3 changed files with 7 additions and 9 deletions
|
|
@ -462,9 +462,8 @@ static int dodelete(
|
|||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -515,9 +515,8 @@ static int domodrdn(
|
|||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -450,8 +450,8 @@ main( int argc, char *argv[] )
|
|||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
@ -514,7 +514,7 @@ main( int argc, char *argv[] )
|
|||
|
||||
ber_memfree( text );
|
||||
ber_memfree( matcheddn );
|
||||
ber_memvfree( refs );
|
||||
ber_memvfree( (void **) refs );
|
||||
ber_memfree( retoid );
|
||||
ber_bvfree( retdata );
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue