qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 21/29] qga: use ARRAY_SIZE macro


From: Philippe Mathieu-Daudé
Subject: [Qemu-devel] [PATCH 21/29] qga: use ARRAY_SIZE macro
Date: Tue, 18 Jul 2017 03:09:57 -0300

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

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
 qga/commands-posix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index d8e412275e..2a5d5cb4ba 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -896,7 +896,7 @@ static void build_guest_fsinfo_for_real_device(char const 
*syspath,
     if (p && sscanf(q, "%u", &host) == 1) {
         has_host = true;
         nhosts = build_hosts(syspath, p, has_ata, hosts,
-                             sizeof(hosts) / sizeof(hosts[0]), errp);
+                             ARRAY_SIZE(hosts), errp);
         if (nhosts < 0) {
             goto cleanup;
         }
-- 
2.13.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]