OSDN Git Service

async: use ARRAY_SIZE macro
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Tue, 18 Jul 2017 06:09:59 +0000 (03:09 -0300)
committerMichael Tokarev <mjt@tls.msk.ru>
Sat, 10 Feb 2018 07:43:18 +0000 (10:43 +0300)
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>
util/aio-posix.c

index 1427f49..d8f0cb4 100644 (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;