From 8871ae946bdcc3f791900c8f0f4bccab0340af40 Mon Sep 17 00:00:00 2001 From: Snaipe Date: Sat, 5 Sep 2015 23:23:00 +0200 Subject: [PATCH] Removed VLA from theories.c --- src/theories.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/theories.c b/src/theories.c index 0431c96..7cc86d9 100644 --- a/src/theories.c +++ b/src/theories.c @@ -186,7 +186,7 @@ static void concat_arg(char (*msg)[4096], struct criterion_datapoints *dps, size void cr_theory_main(struct criterion_datapoints *dps, size_t datapoints, void (*fnptr)(void)) { struct criterion_theory_context *ctx = cr_theory_init(); - size_t indices[datapoints]; + size_t *indices = malloc(datapoints); memset(indices, 0, datapoints * sizeof (size_t)); bool has_next = true; @@ -237,5 +237,6 @@ void cr_theory_main(struct criterion_datapoints *dps, size_t datapoints, void (* } } + free(indices); cr_theory_free(ctx); }