[virt-tools-list] [PATCH 01/12] build: replace deprecated functions
Christophe Fergeau
cfergeau at redhat.com
Wed Dec 14 10:43:27 UTC 2011
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);
Maybe make this g_object_unref(G_OBJECT(pix)).
ACK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20111214/d398187f/attachment.sig>
More information about the virt-tools-list
mailing list