X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=clients%2Ftools%2Fldappasswd.c;h=9a6cb8838a5ef16903122385c803cf656b051269;hb=fb6590f8db1b3cec24e00a888e033ee427d4aaab;hp=6564b6161afc24567733136f384887543bada331;hpb=e97cdfb7a9d13d619f97a62d9070bb4cfb17f64a;p=openldap diff --git a/clients/tools/ldappasswd.c b/clients/tools/ldappasswd.c index 6564b6161a..9a6cb8838a 100644 --- a/clients/tools/ldappasswd.c +++ b/clients/tools/ldappasswd.c @@ -579,8 +579,9 @@ main( int argc, char *argv[] ) (void) ldap_initialize( &ld, ldapuri ); } - if( ld != NULL ) { - fprintf( stderr, "Could not create LDAP session handle (%d): %s\n", rc ); + if( ld == NULL ) { + fprintf( stderr, "Could not create LDAP session handle (%d): %s\n", + rc, ldap_err2string(rc) ); return EXIT_FAILURE; }