Correct improper ldap_result() result checking...

This commit is contained in:
Kurt Zeilenga 2000-07-04 21:59:41 +00:00
parent 20e6dcec3b
commit f6cda93bd1
3 changed files with 7 additions and 9 deletions

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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 );