From 3b90f84422a8b4c59296995f75e5b0fdb3cc905d Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Mon, 13 Oct 2008 07:55:02 +0000 Subject: [PATCH] Fix typo in assertion: j1 + j1 -> j1 + j2. (Not a crasher, just wrong test.) Warning cleanup: Missing braces in initialization. signed meets unsigned. --- servers/slapd/back-meta/bind.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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++ ) -- 2.39.5