From 60a9725d031d36ff0f0903863080d434182555e4 Mon Sep 17 00:00:00 2001 From: freemine Date: Sun, 17 Jan 2021 02:07:25 +0800 Subject: [PATCH] replace array initializer with memset --- tests/examples/c/epoll.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/examples/c/epoll.c b/tests/examples/c/epoll.c index 1ef9b3eddf..eb66156c14 100644 --- a/tests/examples/c/epoll.c +++ b/tests/examples/c/epoll.c @@ -177,7 +177,8 @@ static void* routine(void* arg) { ep_t *ep = (ep_t*)arg; while (!ep->stopping) { - struct epoll_event evs[10] = {0}; + struct epoll_event evs[10]; + memset(evs, 0, sizeof(evs)); A(0==pthread_mutex_lock(&ep->lock), ""); A(ep->waiting==0, "internal logic error"); -- GitLab