summaryrefslogtreecommitdiff
path: root/test/test_choices.c
diff options
context:
space:
mode:
authorJohn Hawthorn <john@hawthorn.email>2019-12-27 22:26:48 -0800
committerGitHub <noreply@github.com>2019-12-27 22:26:48 -0800
commit25ebdd4f95f024bce2ec5b84f72c30bbd63ed57a (patch)
treeba3ff5313500d3b0078c78e1daadce36460c8a3d /test/test_choices.c
parentf770d7da17850036df887b2f41a86c38ba255135 (diff)
parent66316266df901eab81ae116c6e0728d10d0214e4 (diff)
Merge pull request #132 from jhawthorn/no_vla
Avoid use of VLA and reduce memory usage in match to O(m)
Diffstat (limited to 'test/test_choices.c')
-rw-r--r--test/test_choices.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_choices.c b/test/test_choices.c
index 3ad7d6a..d86bc12 100644
--- a/test/test_choices.c
+++ b/test/test_choices.c
@@ -135,8 +135,8 @@ TEST test_choices_unicode() {
}
TEST test_choices_large_input() {
- int N = 100000;
- char *strings[N];
+ const int N = 100000;
+ char *strings[100000];
for(int i = 0; i < N; i++) {
asprintf(&strings[i], "%i", i);