summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2017-07-18 03:09:59 -0300
committerMichael Tokarev <mjt@tls.msk.ru>2018-02-10 10:43:18 +0300
commit8f801baf3a6835a27ea7d0d807041f8916c60fb5 (patch)
tree5835bccbb5027a939e86b344c1dd0134c8a9babb
parent01a6df1b689d28341711aefd2406935d783643f7 (diff)
downloadfocaccia-qemu-8f801baf3a6835a27ea7d0d807041f8916c60fb5.tar.gz
focaccia-qemu-8f801baf3a6835a27ea7d0d807041f8916c60fb5.zip
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>
-rw-r--r--util/aio-posix.c2
1 files changed, 1 insertions, 1 deletions
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;