Re: [PATCH 01/12] build: replace deprecated functions

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

 



Fwiw, I'm not sure I can give ACKs on virt-viewer patches :)
I don't know the code much so I'm only commenting on the patches that are
"easy". Hopefully someone who knows the code more will review the others.

Christophe

On Tue, Dec 13, 2011 at 08:34:59PM +0100, Marc-André Lureau wrote:
> ---
>  src/virt-viewer-app.c    |    8 ++++----
>  src/virt-viewer-util.c   |    2 +-
>  src/virt-viewer-window.c |    2 +-
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c
> index 3b468b3..3d02a0a 100644
> --- a/src/virt-viewer-app.c
> +++ b/src/virt-viewer-app.c
> @@ -577,14 +577,14 @@ virt_viewer_app_create_session(VirtViewerApp *self, const gchar *type)
>  	g_return_val_if_fail(priv->session == NULL, -1);
>  
>  #ifdef HAVE_GTK_VNC
> -	if (g_strcasecmp(type, "vnc") == 0) {
> +	if (g_ascii_strcasecmp(type, "vnc") == 0) {
>  		virt_viewer_app_trace(self, "Guest %s has a %s display\n",
>  				      priv->guest_name, type);
>  		priv->session = virt_viewer_session_vnc_new();
>  	} else
>  #endif
>  #ifdef HAVE_SPICE_GTK
> -	if (g_strcasecmp(type, "spice") == 0) {
> +	if (g_ascii_strcasecmp(type, "spice") == 0) {
>  		virt_viewer_app_trace(self, "Guest %s has a %s display\n",
>  				      priv->guest_name, type);
>  		priv->session = virt_viewer_session_spice_new();
> @@ -635,7 +635,7 @@ virt_viewer_app_channel_open(VirtViewerSession *session,
>  	g_return_if_fail(self != NULL);
>  
>  	priv = self->priv;
> -	if (priv->transport && g_strcasecmp(priv->transport, "ssh") == 0 &&
> +	if (priv->transport && g_ascii_strcasecmp(priv->transport, "ssh") == 0 &&
>  	    !priv->direct) {
>  		if ((fd = virt_viewer_app_open_tunnel_ssh(priv->host, priv->port, priv->user,
>  							  priv->ghost, priv->gport, NULL)) < 0)
> @@ -670,7 +670,7 @@ virt_viewer_app_activate(VirtViewerApp *self)
>  
>  #if defined(HAVE_SOCKETPAIR) && defined(HAVE_FORK)
>  	if (priv->transport &&
> -	    g_strcasecmp(priv->transport, "ssh") == 0 &&
> +	    g_ascii_strcasecmp(priv->transport, "ssh") == 0 &&
>  	    !priv->direct) {
>  		gchar *p = NULL;
>  
> diff --git a/src/virt-viewer-util.c b/src/virt-viewer-util.c
> index 69679e1..5037564 100644
> --- a/src/virt-viewer-util.c
> +++ b/src/virt-viewer-util.c
> @@ -84,7 +84,7 @@ virt_viewer_util_extract_host(const char *uristr,
>  	char *offset;
>  
>  	if (uristr == NULL ||
> -	    !g_strcasecmp(uristr, "xen"))
> +	    !g_ascii_strcasecmp(uristr, "xen"))
>  		uristr = "xen:///";
>  
>  	uri = xmlParseURI(uristr);
> diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c
> index 3176151..324e37f 100644
> --- a/src/virt-viewer-window.c
> +++ b/src/virt-viewer-window.c
> @@ -691,7 +691,7 @@ virt_viewer_window_save_screenshot(VirtViewerWindow *self,
>  
>  	gdk_pixbuf_save(pix, file, "png", NULL,
>  			"tEXt::Generator App", PACKAGE, NULL);
> -	gdk_pixbuf_unref(pix);
> +	g_object_unref(pix);
>  }
>  
>  G_MODULE_EXPORT void
> -- 
> 1.7.7.3
> 
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/virt-tools-list

Attachment: pgp85LnoVMFge.pgp
Description: PGP signature


[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux