From: Kurt Zeilenga Date: Tue, 25 Apr 2000 10:30:42 +0000 (+0000) Subject: Fix typos in version checking X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~3087 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fe8be04237399c379ae7609fa6c63b5e7162f648;p=openldap Fix typos in version checking --- diff --git a/clients/tools/ldapdelete.c b/clients/tools/ldapdelete.c index 4cbf84f1ee..1d7897cec7 100644 --- a/clients/tools/ldapdelete.c +++ b/clients/tools/ldapdelete.c @@ -247,7 +247,7 @@ main( int argc, char **argv ) version = LDAP_VERSION2; } else if ( authmethod == LDAP_AUTH_SASL ) { - if( version != -1 || version != LDAP_VERSION3 ) { + if( version != -1 && version != LDAP_VERSION3 ) { fprintf( stderr, "SASL requires LDAPv3\n" ); return( EXIT_FAILURE ); } @@ -255,7 +255,7 @@ main( int argc, char **argv ) } if( manageDSAit ) { - if( version != -1 || version != LDAP_VERSION3 ) { + if( version != -1 && version != LDAP_VERSION3 ) { fprintf(stderr, "manage DSA control requires LDAPv3\n"); return EXIT_FAILURE; } @@ -263,7 +263,7 @@ main( int argc, char **argv ) } if( use_tls ) { - if( version != -1 || version != LDAP_VERSION3 ) { + if( version != -1 && version != LDAP_VERSION3 ) { fprintf(stderr, "Start TLS requires LDAPv3\n"); return EXIT_FAILURE; } diff --git a/clients/tools/ldapmodify.c b/clients/tools/ldapmodify.c index 034b611b7c..353e192839 100644 --- a/clients/tools/ldapmodify.c +++ b/clients/tools/ldapmodify.c @@ -307,7 +307,7 @@ main( int argc, char **argv ) version = LDAP_VERSION2; } else if ( authmethod == LDAP_AUTH_SASL ) { - if( version != -1 || version != LDAP_VERSION3 ) { + if( version != -1 && version != LDAP_VERSION3 ) { fprintf( stderr, "SASL requires LDAPv3\n" ); return( EXIT_FAILURE ); } @@ -315,7 +315,7 @@ main( int argc, char **argv ) } if( manageDSAit ) { - if( version != -1 || version != LDAP_VERSION3 ) { + if( version != -1 && version != LDAP_VERSION3 ) { fprintf(stderr, "manage DSA control requires LDAPv3\n"); return EXIT_FAILURE; } @@ -323,7 +323,7 @@ main( int argc, char **argv ) } if( use_tls ) { - if( version != -1 || version != LDAP_VERSION3 ) { + if( version != -1 && version != LDAP_VERSION3 ) { fprintf(stderr, "Start TLS requires LDAPv3\n"); return EXIT_FAILURE; } diff --git a/clients/tools/ldapmodrdn.c b/clients/tools/ldapmodrdn.c index 360bb20c2b..fbfa2f75b1 100644 --- a/clients/tools/ldapmodrdn.c +++ b/clients/tools/ldapmodrdn.c @@ -263,7 +263,7 @@ main(int argc, char **argv) version = LDAP_VERSION2; } else if ( authmethod == LDAP_AUTH_SASL ) { - if( version != -1 || version != LDAP_VERSION3 ) { + if( version != -1 && version != LDAP_VERSION3 ) { fprintf( stderr, "SASL requires LDAPv3\n" ); return( EXIT_FAILURE ); } @@ -271,7 +271,7 @@ main(int argc, char **argv) } if( manageDSAit ) { - if( version != -1 || version != LDAP_VERSION3 ) { + if( version != -1 && version != LDAP_VERSION3 ) { fprintf(stderr, "manage DSA control requires LDAPv3\n"); return EXIT_FAILURE; } @@ -279,7 +279,7 @@ main(int argc, char **argv) } if( use_tls ) { - if( version != -1 || version != LDAP_VERSION3 ) { + if( version != -1 && version != LDAP_VERSION3 ) { fprintf(stderr, "Start TLS requires LDAPv3\n"); return EXIT_FAILURE; } diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index f7d050422b..68f9b947a4 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -378,7 +378,7 @@ main( int argc, char **argv ) version = LDAP_VERSION2; } else if ( authmethod == LDAP_AUTH_SASL ) { - if( version != -1 || version != LDAP_VERSION3 ) { + if( version != -1 && version != LDAP_VERSION3 ) { fprintf( stderr, "SASL requires LDAPv3\n" ); return( EXIT_FAILURE ); } @@ -386,7 +386,7 @@ main( int argc, char **argv ) } if( manageDSAit ) { - if( version != -1 || version != LDAP_VERSION3 ) { + if( version != -1 && version != LDAP_VERSION3 ) { fprintf(stderr, "manage DSA control requires LDAPv3\n"); return EXIT_FAILURE; } @@ -394,7 +394,7 @@ main( int argc, char **argv ) } if( use_tls ) { - if( version != -1 || version != LDAP_VERSION3 ) { + if( version != -1 && version != LDAP_VERSION3 ) { fprintf(stderr, "Start TLS requires LDAPv3\n"); return EXIT_FAILURE; }