replace array initializer with memset

This commit is contained in:
freemine 2021-01-17 02:07:25 +08:00
parent 54af96b6f0
commit 60a9725d03
1 changed files with 2 additions and 1 deletions

View File

@ -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");