From: Philippe Mathieu-Daudé Date: Tue, 18 Jul 2017 06:09:57 +0000 (-0300) Subject: qga: use ARRAY_SIZE macro X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=01a6df1b689d28341711aefd2406935d783643f7;p=qemu.git qga: use ARRAY_SIZE macro Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Michael Tokarev Reviewed-by: Marc-André Lureau --- 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; }