From 38c10bd6d94a77a34b045ddb6511969c175248f7 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Wed, 1 Mar 2017 23:37:07 -0800 Subject: [PATCH] Avoid variable length arrays --- test/core/iomgr/ev_epoll_linux_test.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/core/iomgr/ev_epoll_linux_test.c b/test/core/iomgr/ev_epoll_linux_test.c index 4ec959995b2..867835aa1c6 100644 --- a/test/core/iomgr/ev_epoll_linux_test.c +++ b/test/core/iomgr/ev_epoll_linux_test.c @@ -144,10 +144,10 @@ static void test_pollset_queue_merge_items() { const int num_fds = 2; const int num_pollsets = 2; const int num_closures = 4; - test_fd tfds[num_fds]; - int fds[num_fds]; - test_pollset pollsets[num_pollsets]; - grpc_closure closures[num_closures]; + test_fd tfds[2 /* num_fds */]; + int fds[2 /* num_fds */]; + test_pollset pollsets[2 /* num_pollsets */]; + grpc_closure closures[4 /* num_closures */]; int i; int result = 0; @@ -217,9 +217,9 @@ static void test_add_fd_to_pollset() { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; const int num_fds = 8; const int num_pollsets = 4; - test_fd tfds[num_fds]; - int fds[num_fds]; - test_pollset pollsets[num_pollsets]; + test_fd tfds[8 /* num_fds */]; + int fds[8 /* num_fds */]; + test_pollset pollsets[4 /* num_pollsets */]; void *expected_pi = NULL; int i;