qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 12/12] qemu-file: Make qemu_fflush() return errors


From: Fabiano Rosas
Subject: Re: [PATCH 12/12] qemu-file: Make qemu_fflush() return errors
Date: Tue, 24 Oct 2023 14:56:51 -0300

Juan Quintela <quintela@redhat.com> writes:

> This let us simplify code of this shape.
>
>    qemu_fflush(f);
>    int ret = qemu_file_get_error(f);
>    if (ret) {
>       return ret;
>    }
>
> into:
>
>    int ret = qemu_fflush(f);
>    if (ret) {
>       return ret;
>    }
>
> I updated all callers where there is any error check.
> qemu_fclose() don't need to check for f->last_error because
> qemu_fflush() returns it at the beggining of the function.
>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Signed-off-by: Juan Quintela <quintela@redhat.com>

Reviewed-by: Fabiano Rosas <farosas@suse.de>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]