qemu-trivial
[Top][All Lists]
Advanced

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

[Qemu-trivial] [PULL 13/17] qga: use ARRAY_SIZE macro


From: Michael Tokarev
Subject: [Qemu-trivial] [PULL 13/17] qga: use ARRAY_SIZE macro
Date: Sat, 10 Feb 2018 10:55:08 +0300

From: Philippe Mathieu-Daudé <address@hidden>

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

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
Reviewed-by: Marc-André Lureau <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 88807f3c78..967061444a 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -901,7 +901,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.11.0




reply via email to

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