On Mon, Jul 17, 2017 at 11:09 PM, Philippe Mathieu-Daudé
<f4bug@amsat.org> wrote:
> Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> 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 d8e412275e..2a5d5cb4ba 100644
> --- a/qga/commands-posix.c
> +++ b/qga/commands-posix.c
> @@ -896,7 +896,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.13.2
>
>
--
Marc-André Lureau