summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2017-07-18 03:09:57 -0300
committerMichael Tokarev <mjt@tls.msk.ru>2018-02-10 10:42:40 +0300
commit01a6df1b689d28341711aefd2406935d783643f7 (patch)
tree0969f847f6e771f10f6487f93a9ee85ef041ecf6
parente5dd987522b6c421e045d0890cbcd2656092cf22 (diff)
downloadfocaccia-qemu-01a6df1b689d28341711aefd2406935d783643f7.tar.gz
focaccia-qemu-01a6df1b689d28341711aefd2406935d783643f7.zip
qga: 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--qga/commands-posix.c2
1 files changed, 1 insertions, 1 deletions
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;
         }