From c682e101ea8b9c1152aedca4dbbd8781d3f4706b Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Wed, 6 Jul 2005 08:06:47 +0000 Subject: [PATCH] ISO C chokes on non-constant array initializers --- tests/progs/slapd-modify.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/progs/slapd-modify.c b/tests/progs/slapd-modify.c index 301f01f1cc..37e45ec19e 100644 --- a/tests/progs/slapd-modify.c +++ b/tests/progs/slapd-modify.c @@ -148,10 +148,12 @@ do_modify( char *uri, char *host, int port, char *manager, struct ldapmod mod; struct ldapmod *mods[2]; - char *values[2] = { value, NULL }; + char *values[2]; pid = getpid(); + values[0] = value; + values[1] = NULL; mod.mod_op = LDAP_MOD_ADD; mod.mod_type = attr; mod.mod_values = values; -- 2.39.5