From: Pierangelo Masarati Date: Sat, 5 Nov 2005 12:23:17 +0000 (+0000) Subject: don't perror when not required X-Git-Tag: OPENLDAP_REL_ENG_2_2_MP~91 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1a28cc1c64fbb24c86e2a35cb6a8324bd89a95fe;p=openldap don't perror when not required --- diff --git a/clients/tools/common.c b/clients/tools/common.c index 52575ca987..eb6f9869db 100644 --- a/clients/tools/common.c +++ b/clients/tools/common.c @@ -1017,7 +1017,12 @@ tool_bind( LDAP *ld ) ldap_controls_free( ctrls ); } - if ( err != LDAP_SUCCESS || msgbuf[0] || matched || info || refs ) { + if ( err != LDAP_SUCCESS + || msgbuf[0] + || ( matched && matched[ 0 ] ) + || ( info && info[ 0 ] ) + || refs ) + { tool_perror( err, msgbuf, matched, info, refs ); if( matched ) ber_memfree( matched );