Browse Source

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>
pull/66/head
Philippe Mathieu-Daudé 9 years ago
committed by Michael Tokarev
parent
commit
01a6df1b68
  1. 2
      qga/commands-posix.c

2
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;
}

Loading…
Cancel
Save