From: Howard Chu Date: Fri, 24 Jun 2011 00:10:37 +0000 (-0700) Subject: ITS#6977 fix verbose check in client tools X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d76be4828c493e0431b415e016685094e0a6778f;p=openldap ITS#6977 fix verbose check in client tools --- diff --git a/clients/tools/ldapexop.c b/clients/tools/ldapexop.c index 316eca1172..6fc4d1e3c6 100644 --- a/clients/tools/ldapexop.c +++ b/clients/tools/ldapexop.c @@ -318,7 +318,8 @@ main( int argc, char *argv[] ) } } - if( verbose || ( code != LDAP_SUCCESS ) || matcheddn || text || refs ) { + if( verbose || code != LDAP_SUCCESS || + ( matcheddn && *matcheddn ) || ( text && *text ) || refs ) { printf( _("Result: %s (%d)\n"), ldap_err2string( code ), code ); if( text && *text ) { diff --git a/clients/tools/ldappasswd.c b/clients/tools/ldappasswd.c index a73a767174..81e9c76c95 100644 --- a/clients/tools/ldappasswd.c +++ b/clients/tools/ldappasswd.c @@ -374,7 +374,7 @@ main( int argc, char *argv[] ) } if( verbose || code != LDAP_SUCCESS || - matcheddn || text || refs || ctrls ) + ( matcheddn && *matcheddn ) || ( text && *text ) || refs || ctrls ) { printf( _("Result: %s (%d)\n"), ldap_err2string( code ), code ); diff --git a/clients/tools/ldapvc.c b/clients/tools/ldapvc.c index 49ac406aa0..73166b1d8e 100644 --- a/clients/tools/ldapvc.c +++ b/clients/tools/ldapvc.c @@ -469,8 +469,8 @@ main( int argc, char *argv[] ) } skip: - if ( verbose || ( code != LDAP_SUCCESS ) || - matcheddn || text || refs || ctrls ) + if ( verbose || code != LDAP_SUCCESS || + ( matcheddn && *matcheddn ) || ( text && *text ) || refs || ctrls ) { printf( _("Result: %s (%d)\n"), ldap_err2string( code ), code ); diff --git a/clients/tools/ldapwhoami.c b/clients/tools/ldapwhoami.c index e6c2a237eb..4f4c9f6290 100644 --- a/clients/tools/ldapwhoami.c +++ b/clients/tools/ldapwhoami.c @@ -199,8 +199,8 @@ main( int argc, char *argv[] ) skip: ldap_msgfree(res); - if ( verbose || ( code != LDAP_SUCCESS ) || - matcheddn || text || refs || ctrls ) + if ( verbose || code != LDAP_SUCCESS || + ( matcheddn && *matcheddn ) || ( text && *text ) || refs || ctrls ) { printf( _("Result: %s (%d)\n"), ldap_err2string( code ), code );