]> git.sur5r.net Git - openldap/blobdiff - clients/tools/ldappasswd.c
Add -H to usage
[openldap] / clients / tools / ldappasswd.c
index 6564b6161afc24567733136f384887543bada331..9a6cb8838a5ef16903122385c803cf656b051269 100644 (file)
@@ -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;
        }