diff options
Diffstat (limited to 'qga/commands-posix.c')
| -rw-r--r-- | qga/commands-posix.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qga/commands-posix.c b/qga/commands-posix.c index e809e382eb..967061444a 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -18,6 +18,7 @@ #include <dirent.h> #include "qga/guest-agent-core.h" #include "qga-qmp-commands.h" +#include "qapi/error.h" #include "qapi/qmp/qerror.h" #include "qemu/queue.h" #include "qemu/host-utils.h" @@ -900,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; } |