]> git.sur5r.net Git - openldap/commitdiff
ldap_perror: don't print matched DN or error text if length is zero.
authorKurt Zeilenga <kurt@openldap.org>
Mon, 2 Aug 1999 20:03:50 +0000 (20:03 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 2 Aug 1999 20:03:50 +0000 (20:03 +0000)
libraries/libldap/error.c

index 0c58e185076932b1e3e56cca7445a44ad1ffc1b2..5780012bc7daecb41b615e0a8524cab3e865f5d3 100644 (file)
@@ -145,12 +145,12 @@ ldap_perror( LDAP *ld, LDAP_CONST char *str )
                        s, ld->ld_errno );
        }
 
-       if ( ld->ld_matched != NULL ) {
+       if ( ld->ld_matched != NULL && ld->ld_matched[0] != '\0' ) {
                fprintf( stderr, "\tmatched: \"%s\"\n",
                        ld->ld_matched );
        }
 
-       if ( ld->ld_error != NULL ) {
+       if ( ld->ld_error != NULL && ld->ld_error[0] != '\0' ) {
                fprintf( stderr, "\tadditional info: %s\n",
                    ld->ld_error );
        }