Vladimir Sementsov-Ogievskiy <[email protected]> writes:

> No reason to split into peek + get.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]>
> ---
>  migration/qemu-file.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/migration/qemu-file.c b/migration/qemu-file.c
> index 02f30c1c21..3a9a0a49d4 100644
> --- a/migration/qemu-file.c
> +++ b/migration/qemu-file.c
> @@ -396,8 +396,7 @@ int qemu_file_get_fd(QEMUFile *f)
>          goto fail;
>      }
>  
> -    /* Force the dummy byte and its fd passenger to appear. */
> -    qemu_peek_byte(f, 0);
> +    qemu_get_byte(f);
>  
>      fde = QTAILQ_FIRST(&f->fds);
>      if (!fde) {
> @@ -405,7 +404,6 @@ int qemu_file_get_fd(QEMUFile *f)
>          goto fail;
>      }
>  
> -    qemu_get_byte(f);       /* Drop the dummy byte */
>      fd = fde->fd;
>      QTAILQ_REMOVE(&f->fds, fde, entry);
>      g_free(fde);

Reviewed-by: Fabiano Rosas <[email protected]>

Reply via email to