From 753a6d00083061920741a29f8fa37de19c9b5fdf Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Sun, 16 Nov 2008 03:10:15 +0000 Subject: [PATCH] C89 rejects ITS#5784 non-constant array init (backend.c 1.402,-controls.c 1.201) --- servers/slapd/backend.c | 4 +++- servers/slapd/controls.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) 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 ); } } -- 2.39.5