From: Philippe Mathieu-Daudé Date: Tue, 18 Jul 2017 06:09:59 +0000 (-0300) Subject: async: use ARRAY_SIZE macro X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8f801baf3a6835a27ea7d0d807041f8916c60fb5;p=qemu.git async: use ARRAY_SIZE macro Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Michael Tokarev Reviewed-by: Marc-André Lureau --- diff --git a/util/aio-posix.c b/util/aio-posix.c index 1427f49b4a..d8f0cb4af8 100644 --- a/util/aio-posix.c +++ b/util/aio-posix.c @@ -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;