From 1a28cc1c64fbb24c86e2a35cb6a8324bd89a95fe Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 5 Nov 2005 12:23:17 +0000 Subject: [PATCH] don't perror when not required --- clients/tools/common.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 ); -- 2.39.5