From: Howard Chu Date: Sun, 9 Apr 2017 23:54:21 +0000 (+0100) Subject: Cleanup unused vars X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=29833786ada3dc4c56f16edce84da8eb96d94ed9;p=openldap Cleanup unused vars --- diff --git a/servers/slapd/schema_init.c b/servers/slapd/schema_init.c index 875422f296..16c4d1ce5d 100644 --- a/servers/slapd/schema_init.c +++ b/servers/slapd/schema_init.c @@ -721,7 +721,6 @@ int octetStringIndexer( void *ctx ) { int i; - size_t slen, mlen; BerVarray keys; HASH_CONTEXT HASHcontext; unsigned char HASHdigest[HASH_BYTES]; @@ -738,9 +737,6 @@ int octetStringIndexer( keys = slap_sl_malloc( sizeof( struct berval ) * (i+1), ctx ); - slen = syntax->ssyn_oidlen; - mlen = mr->smr_oidlen; - hashPreset( &HASHcontext, prefix, 0, syntax, mr); for( i=0; !BER_BVISNULL( &values[i] ); i++ ) { hashIter( &HASHcontext, HASHdigest, @@ -766,7 +762,6 @@ int octetStringFilter( BerVarray *keysp, void *ctx ) { - size_t slen, mlen; BerVarray keys; HASH_CONTEXT HASHcontext; unsigned char HASHdigest[HASH_BYTES]; @@ -775,9 +770,6 @@ int octetStringFilter( digest.bv_val = (char *)HASHdigest; digest.bv_len = HASH_LEN; - slen = syntax->ssyn_oidlen; - mlen = mr->smr_oidlen; - keys = slap_sl_malloc( sizeof( struct berval ) * 2, ctx ); hashPreset( &HASHcontext, prefix, 0, syntax, mr ); @@ -929,7 +921,6 @@ octetStringSubstringsIndexer( void *ctx ) { ber_len_t i, nkeys; - size_t slen, mlen; BerVarray keys; HASH_CONTEXT HCany, HCini, HCfin; @@ -975,9 +966,6 @@ octetStringSubstringsIndexer( keys = slap_sl_malloc( sizeof( struct berval ) * (nkeys+1), ctx ); - slen = syntax->ssyn_oidlen; - mlen = mr->smr_oidlen; - if ( flags & SLAP_INDEX_SUBSTR_ANY ) hashPreset( &HCany, prefix, SLAP_INDEX_SUBSTR_PREFIX, syntax, mr ); if( flags & SLAP_INDEX_SUBSTR_INITIAL ) @@ -1051,7 +1039,7 @@ octetStringSubstringsFilter ( SubstringsAssertion *sa; char pre; ber_len_t nkeys = 0; - size_t slen, mlen, klen; + size_t klen; BerVarray keys; HASH_CONTEXT HASHcontext; unsigned char HASHdigest[HASH_BYTES]; @@ -1103,9 +1091,6 @@ octetStringSubstringsFilter ( digest.bv_val = (char *)HASHdigest; digest.bv_len = HASH_LEN; - slen = syntax->ssyn_oidlen; - mlen = mr->smr_oidlen; - keys = slap_sl_malloc( sizeof( struct berval ) * (nkeys+1), ctx ); nkeys = 0; @@ -1816,7 +1801,7 @@ UTF8StringValidate( struct berval *in ) { int len; - unsigned char *u = (unsigned char *)in->bv_val, *end = in->bv_val + in->bv_len; + unsigned char *u = (unsigned char *)in->bv_val, *end = (unsigned char *)in->bv_val + in->bv_len; if( BER_BVISEMPTY( in ) && syntax == slap_schema.si_syn_directoryString ) { /* directory strings cannot be empty */