async: use ARRAY_SIZE macro

Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Philippe Mathieu-Daudé 2017-07-18 03:09:59 -03:00 committed by Michael Tokarev
parent 01a6df1b68
commit 8f801baf3a

View file

@ -119,7 +119,7 @@ static int aio_epoll(AioContext *ctx, GPollFD *pfds,
}
if (timeout <= 0 || ret > 0) {
ret = epoll_wait(ctx->epollfd, events,
sizeof(events) / sizeof(events[0]),
ARRAY_SIZE(events),
timeout);
if (ret <= 0) {
goto out;