|
| From: | Juan Quintela |
| Subject: | Re: [PATCH v2 12/13] ram compress: Assert that the file buffer matches the result |
| Date: | Fri, 28 Apr 2023 19:24:48 +0200 |
| User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Lukas Straub <lukasstraub2@web.de> wrote:
> Before this series, "nothing to send" was handled by the file buffer
> being empty. Now it is tracked via param->result.
>
> Assert that the file buffer state matches the result.
>
> Signed-off-by: Lukas Straub <lukasstraub2@web.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Even when:
> +/*
> + * Check if the writable buffer is empty
> + */
> +
> +bool qemu_file_buffer_empty(QEMUFile *file)
> +{
> + assert(qemu_file_is_writable(file));
A function that is basically an assert
> + assert(qemu_file_buffer_empty(f));
Is always called as an assert O:-)
| [Prev in Thread] | Current Thread | [Next in Thread] |