ISO C chokes on non-constant array initializers

This commit is contained in:
Hallvard Furuseth 2005-07-06 08:06:47 +00:00
parent f841c364eb
commit c682e101ea

View file

@ -148,10 +148,12 @@ do_modify( char *uri, char *host, int port, char *manager,
struct ldapmod mod; struct ldapmod mod;
struct ldapmod *mods[2]; struct ldapmod *mods[2];
char *values[2] = { value, NULL }; char *values[2];
pid = getpid(); pid = getpid();
values[0] = value;
values[1] = NULL;
mod.mod_op = LDAP_MOD_ADD; mod.mod_op = LDAP_MOD_ADD;
mod.mod_type = attr; mod.mod_type = attr;
mod.mod_values = values; mod.mod_values = values;