From 4ea6beae068a4332d10f8dd0d61e6b0eeb8e4678 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Tue, 16 Feb 2010 11:55:33 +0000 Subject: [PATCH] silenced compiler warning --- contrib/ldapc++/src/TlsOptions.cpp | 2 +- contrib/ldapc++/src/TlsOptions.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/ldapc++/src/TlsOptions.cpp b/contrib/ldapc++/src/TlsOptions.cpp index 0cba46ea18..9c5ebd67e5 100644 --- a/contrib/ldapc++/src/TlsOptions.cpp +++ b/contrib/ldapc++/src/TlsOptions.cpp @@ -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" ) ); } diff --git a/contrib/ldapc++/src/TlsOptions.h b/contrib/ldapc++/src/TlsOptions.h index 573b4f95c8..59da72a50e 100644 --- a/contrib/ldapc++/src/TlsOptions.h +++ b/contrib/ldapc++/src/TlsOptions.h @@ -21,7 +21,8 @@ class TlsOptions { RANDOM_FILE, CRLCHECK, DHFILE, - NEWCTX + NEWCTX, + LASTOPT /* dummy */ }; TlsOptions( LDAP* ld=NULL ); -- 2.39.5