qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] ui: remove useless typecasts


From: Claudio Fontana
Subject: Re: [PATCH] ui: remove useless typecasts
Date: Mon, 24 Oct 2022 12:12:06 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0

On 10/22/22 16:12, Volker Rümelin wrote:
> Commit 8f9abdf586 ("chardev: src buffer const for write functions")
> changed the type of the second parameter of qemu_chr_be_write()
> from uint8_t * to const uint8_t *. Remove the now useless type
> casts from qemu_chr_be_write() function calls in ui/console.c and
> ui/gtk.c.
> 
> Cc: qemu-trivial@nongnu.org
> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>

Reviewed-by: Claudio Fontana <cfontana@suse.de>

> ---
>  ui/console.c | 2 +-
>  ui/gtk.c     | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/ui/console.c b/ui/console.c
> index 49da6a91df..65c117874c 100644
> --- a/ui/console.c
> +++ b/ui/console.c
> @@ -1297,7 +1297,7 @@ static void kbd_send_chars(QemuConsole *s)
>          uint32_t size;
>  
>          buf = fifo8_pop_buf(&s->out_fifo, MIN(len, avail), &size);
> -        qemu_chr_be_write(s->chr, (uint8_t *)buf, size);
> +        qemu_chr_be_write(s->chr, buf, size);
>          len = qemu_chr_be_can_write(s->chr);
>          avail -= size;
>      }
> diff --git a/ui/gtk.c b/ui/gtk.c
> index 92daaa6a6e..7ec21f7798 100644
> --- a/ui/gtk.c
> +++ b/ui/gtk.c
> @@ -1763,7 +1763,7 @@ static void gd_vc_send_chars(VirtualConsole *vc)
>          uint32_t size;
>  
>          buf = fifo8_pop_buf(&vc->vte.out_fifo, MIN(len, avail), &size);
> -        qemu_chr_be_write(vc->vte.chr, (uint8_t *)buf, size);
> +        qemu_chr_be_write(vc->vte.chr, buf, size);
>          len = qemu_chr_be_can_write(vc->vte.chr);
>          avail -= size;
>      }




reply via email to

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