[Spice-devel] [PATCH spice-server v2] Do not use bzero

Christophe de Dinechin cdupontd at redhat.com
Mon Jun 25 11:56:44 UTC 2018



> On 25 Jun 2018, at 12:50, Frediano Ziglio <fziglio at redhat.com> wrote:
> 
> Not defined in MingW.
> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> server/display-channel.c | 2 +-
> server/tests/replay.c    | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
> 
> Changes since v1:
> - added another occurrency.
> 
> diff --git a/server/display-channel.c b/server/display-channel.c
> index 5f2e866f..b5e4b61d 100644
> --- a/server/display-channel.c
> +++ b/server/display-channel.c
> @@ -1627,7 +1627,7 @@ static Drawable *display_channel_drawable_try_new(DisplayChannel *display,
>             return NULL;
>     }
> 
> -    bzero(drawable, sizeof(Drawable));
> +    memset(drawable, 0, sizeof(Drawable));
>     /* Pointer to the display from which the drawable is allocated.  This
>      * pointer is safe to be retained as DisplayChannel lifespan is bigger than
>      * all drawables.  */
> diff --git a/server/tests/replay.c b/server/tests/replay.c
> index 137f0606..a3379adc 100644
> --- a/server/tests/replay.c
> +++ b/server/tests/replay.c
> @@ -96,7 +96,7 @@ static void set_compression_level(QXLInstance *qin, int level)
> 
> static void get_init_info(QXLInstance *qin, QXLDevInitInfo *info)
> {
> -    bzero(info, sizeof(*info));
> +    memset(info, 0, sizeof(*info));
>     info->num_memslots = 1;
>     info->num_memslots_groups = 1;
>     info->memslot_id_bits = 1;
> -- 
> 2.17.1


Acked-by: Christophe de Dinechin <dinechin at redhat.com> 
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel



More information about the Spice-devel mailing list