From: Hallvard Furuseth Date: Mon, 13 Oct 2008 07:55:02 +0000 (+0000) Subject: Fix typo in assertion: j1 + j1 -> j1 + j2. (Not a crasher, just wrong test.) X-Git-Tag: ACLCHECK_0~1264 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3b90f84422a8b4c59296995f75e5b0fdb3cc905d;p=openldap Fix typo in assertion: j1 + j1 -> j1 + j2. (Not a crasher, just wrong test.) Warning cleanup: Missing braces in initialization. signed meets unsigned. --- diff --git a/servers/slapd/back-meta/bind.c b/servers/slapd/back-meta/bind.c index bcfd191526..439f05dd81 100644 --- a/servers/slapd/back-meta/bind.c +++ b/servers/slapd/back-meta/bind.c @@ -1575,7 +1575,7 @@ meta_back_controls_add( LDAPControl **ctrls = NULL; /* set to the maximum number of controls this backend can add */ - LDAPControl c[ 2 ] = { 0 }; + LDAPControl c[ 2 ] = {{ 0 }}; int n = 0, i, j1 = 0, j2 = 0; *pctrls = NULL; @@ -1642,7 +1642,7 @@ meta_back_controls_add( goto done; } - assert( j1 + j1 <= sizeof( c )/sizeof(LDAPControl) ); + assert( j1 + j2 <= (int) (sizeof( c )/sizeof( c[0] )) ); if ( op->o_ctrls ) { for ( n = 0; op->o_ctrls[ n ]; n++ )