]> git.sur5r.net Git - openldap/commitdiff
C89 rejects ITS#5784 non-constant array init (backend.c 1.402,-controls.c 1.201)
authorHallvard Furuseth <hallvard@openldap.org>
Sun, 16 Nov 2008 03:10:15 +0000 (03:10 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Sun, 16 Nov 2008 03:10:15 +0000 (03:10 +0000)
servers/slapd/backend.c
servers/slapd/controls.c

index 0a573ca1a19cebddcf63c22da17410c5a7f933e8..df66dd0f0992f9e23b7fee5cce8c272a64ba9cb1 100644 (file)
@@ -946,7 +946,9 @@ backend_check_controls(
                                if ( !op->o_bd->be_ctrls[cid] && (*ctrls)->ldctl_iscritical ) {
 #ifdef SLAP_CONTROL_X_WHATFAILED
                                        if ( get_whatFailed( op ) ) {
-                                               char *oids[ 2 ] = { (*ctrls)->ldctl_oid, NULL };
+                                               char *oids[ 2 ];
+                                               oids[ 0 ] = (*ctrls)->ldctl_oid;
+                                               oids[ 1 ] = NULL;
                                                slap_ctrl_whatFailed_add( op, rs, oids );
                                        }
 #endif
index b812bf6b153c5b4637492811d5402b78cd64306c..f952b1dd944663e5b9c30c83363b01fcce067230 100644 (file)
@@ -863,7 +863,9 @@ return_results:
                                }
 
                                if ( get_whatFailed( op ) ) {
-                                       char *oids[ 2 ] = { failed_oid, NULL };
+                                       char *oids[ 2 ];
+                                       oids[ 0 ] = failed_oid;
+                                       oids[ 1 ] = NULL;
                                        slap_ctrl_whatFailed_add( op, rs, oids );
                                }
                        }