From: Hallvard Furuseth Date: Sun, 16 Nov 2008 03:10:15 +0000 (+0000) Subject: C89 rejects ITS#5784 non-constant array init (backend.c 1.402,-controls.c 1.201) X-Git-Tag: ACLCHECK_0~1092 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=753a6d00083061920741a29f8fa37de19c9b5fdf;p=openldap C89 rejects ITS#5784 non-constant array init (backend.c 1.402,-controls.c 1.201) --- diff --git a/servers/slapd/backend.c b/servers/slapd/backend.c index 0a573ca1a1..df66dd0f09 100644 --- a/servers/slapd/backend.c +++ b/servers/slapd/backend.c @@ -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 diff --git a/servers/slapd/controls.c b/servers/slapd/controls.c index b812bf6b15..f952b1dd94 100644 --- a/servers/slapd/controls.c +++ b/servers/slapd/controls.c @@ -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 ); } }