From 148cc2f2fc6d7487ecca622423f6c98324343fbf Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Wed, 19 Aug 2009 13:20:11 +0000 Subject: [PATCH] silence warnings --- servers/slapd/back-ldap/search.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/servers/slapd/back-ldap/search.c b/servers/slapd/back-ldap/search.c index 7e1af12a9f..c745828501 100644 --- a/servers/slapd/back-ldap/search.c +++ b/servers/slapd/back-ldap/search.c @@ -832,7 +832,9 @@ ldap_build_entry( LBER_FREE( attr->a_nvals[i].bv_val ); LBER_FREE( attr->a_vals[i].bv_val ); attr->a_numvals--; - if ( i < attr->a_numvals ) { + + assert( i >= 0 ); + if ( (unsigned)i < attr->a_numvals ) { attr->a_vals[i] = attr->a_vals[attr->a_numvals]; if ( attr->a_nvals != attr->a_vals ) attr->a_nvals[i] = attr->a_nvals[attr->a_numvals]; -- 2.39.5