[Spice-devel] [PATCH spice-common 2/4] Replace spice_* logging with g_*

Frediano Ziglio fziglio at redhat.com
Wed Jun 14 10:55:00 UTC 2017


Yesterday trying to remove some environment variable I realized that
by default spice_critical is fatal while g_critical is not introducing
a regression with possible security problems.

> 
> From: Marc-André Lureau <marcandre.lureau at redhat.com>
> 
> ---
>  common/canvas_base.c        | 148 ++++++++++++++++++++---------------------
>  common/canvas_utils.c       |  18 ++---
>  common/gdi_canvas.c         |  82 +++++++++++------------
>  common/lz.c                 |  22 +++----
>  common/lz_decompress_tmpl.c |  18 ++---
>  common/marshaller.c         |   2 +-
>  common/mem.c                |   2 +-
>  common/pixman_utils.c       | 156
>  ++++++++++++++++++++++----------------------
>  common/quic.c               |  88 ++++++++++++-------------
>  common/quic_family_tmpl.c   |   6 +-
>  common/quic_rgb_tmpl.c      |  32 ++++-----
>  common/quic_tmpl.c          |  32 ++++-----
>  common/rect.h               |   2 +-
>  common/region.c             |   2 +-
>  common/ring.h               |  26 ++++----
>  common/rop3.c               |  10 +--
>  common/snd_codec.c          |  18 ++---
>  common/ssl_verify.c         |  72 ++++++++++----------
>  common/sw_canvas.c          |  20 +++---
>  19 files changed, 378 insertions(+), 378 deletions(-)
> 
> diff --git a/common/canvas_base.c b/common/canvas_base.c
> index 8f653e0..c5cea60 100644
> --- a/common/canvas_base.c
> +++ b/common/canvas_base.c
> @@ -99,7 +99,7 @@ static HDC create_compatible_dc()
>  {
>      HDC dc = CreateCompatibleDC(NULL);
>  
> -    spice_return_val_if_fail(dc != NULL, NULL);
> +    g_return_val_if_fail(dc != NULL, NULL);
>  
>      return dc;
>  }
> @@ -381,7 +381,7 @@ static pixman_image_t *canvas_get_quic(CanvasBase
> *canvas, SpiceImage *image,
>  
>      if (setjmp(quic_data->jmp_env)) {
>          pixman_image_unref(surface);
> -        spice_warning("%s", quic_data->message_buf);
> +        g_warning("%s", quic_data->message_buf);
>          return NULL;
>      }
>  

...

Frediano


More information about the Spice-devel mailing list