]> git.sur5r.net Git - openldap/commitdiff
Fix typo in assertion: j1 + j1 -> j1 + j2. (Not a crasher, just wrong test.)
authorHallvard Furuseth <hallvard@openldap.org>
Mon, 13 Oct 2008 07:55:02 +0000 (07:55 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Mon, 13 Oct 2008 07:55:02 +0000 (07:55 +0000)
Warning cleanup: Missing braces in initialization. signed meets unsigned.

servers/slapd/back-meta/bind.c

index bcfd191526dab1b1c5069d27a7de04b14efb798b..439f05dd8176e16aae9a3394d1408ee943d88f3c 100644 (file)
@@ -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++ )