]> git.sur5r.net Git - openldap/commitdiff
silenced compiler warning
authorRalf Haferkamp <ralf@openldap.org>
Tue, 16 Feb 2010 11:55:33 +0000 (11:55 +0000)
committerRalf Haferkamp <ralf@openldap.org>
Tue, 16 Feb 2010 11:55:33 +0000 (11:55 +0000)
contrib/ldapc++/src/TlsOptions.cpp
contrib/ldapc++/src/TlsOptions.h

index 0cba46ea18128c857fad75dafdeb384cd600cc4a..9c5ebd67e50074e053bd445215d8c5b3fe93b1f6 100644 (file)
@@ -39,7 +39,7 @@ static tls_optmap_t optmap[] = {
 #endif 
 
 void checkOpt( TlsOptions::tls_option opt, opttype type ){
-    if ( opt >= sizeof(optmap) ){
+    if ( opt < TlsOptions::CACERTFILE || opt >= TlsOptions::LASTOPT ){
         throw( LDAPException( LDAP_PARAM_ERROR, "unknown Option" ) );
     }
 
index 573b4f95c835babe79c6ec0e2501c455a698b6a2..59da72a50e3d0fcff45dc007fe0edfff20debff1 100644 (file)
@@ -21,7 +21,8 @@ class TlsOptions {
             RANDOM_FILE,
             CRLCHECK,
             DHFILE,
-            NEWCTX
+            NEWCTX,
+            LASTOPT /* dummy */
         };
 
         TlsOptions( LDAP* ld=NULL );