C89 rejects ITS#5784 non-constant array init (backend.c 1.402,-controls.c 1.201)

This commit is contained in:
Hallvard Furuseth 2008-11-16 03:10:15 +00:00
parent 6009dd4ec0
commit 753a6d0008
2 changed files with 6 additions and 2 deletions

View 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

View 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 );
}
}