Re: 2 more patches
- From: "Daniel P. Berrange" <dan berrange com>
- To: Jonh Wendell <jwendell gnome org>
- Cc: gtk-vnc-devel List <gtk-vnc-list gnome org>
- Subject: Re: 2 more patches
- Date: Tue, 10 Nov 2009 11:21:38 +0000
On Fri, Oct 30, 2009 at 10:00:17AM -0300, Jonh Wendell wrote:
> that make valgrind happy
>
> OK?
ACK, dunno how this even worked before :-)
Daniel
> diff --git a/src/vncdisplay.c b/src/vncdisplay.c
> index 0b63220..d7835da 100644
> --- a/src/vncdisplay.c
> +++ b/src/vncdisplay.c
> @@ -164,7 +164,6 @@ typedef enum
> static guint signals[LAST_SIGNAL] = { 0, 0, 0, 0,
> 0, 0, 0, 0,
> 0, 0, 0, 0, 0,};
> -static GParamSpec *signalCredParam;
> gboolean debug_enabled = FALSE;
>
> static const GOptionEntry gtk_vnc_args[] =
> @@ -1119,17 +1118,17 @@ static gboolean on_auth_cred(void *opaque)
>
> cred_list = g_value_array_new(0);
> if (gvnc_wants_credential_username(obj->priv->gvnc)) {
> - g_value_init(&username, G_PARAM_SPEC_VALUE_TYPE(signalCredParam));
> + g_value_init(&username, VNC_TYPE_DISPLAY_CREDENTIAL);
> g_value_set_enum(&username, VNC_DISPLAY_CREDENTIAL_USERNAME);
> cred_list = g_value_array_append(cred_list, &username);
> }
> if (gvnc_wants_credential_password(obj->priv->gvnc)) {
> - g_value_init(&password, G_PARAM_SPEC_VALUE_TYPE(signalCredParam));
> + g_value_init(&password, VNC_TYPE_DISPLAY_CREDENTIAL);
> g_value_set_enum(&password, VNC_DISPLAY_CREDENTIAL_PASSWORD);
> cred_list = g_value_array_append(cred_list, &password);
> }
> if (gvnc_wants_credential_x509(obj->priv->gvnc)) {
> - g_value_init(&clientname, G_PARAM_SPEC_VALUE_TYPE(signalCredParam));
> + g_value_init(&clientname, VNC_TYPE_DISPLAY_CREDENTIAL);
> g_value_set_enum(&clientname, VNC_DISPLAY_CREDENTIAL_CLIENTNAME);
> cred_list = g_value_array_append(cred_list, &clientname);
> }
> @@ -1810,13 +1809,6 @@ static void vnc_display_class_init(VncDisplayClass *klass)
> G_PARAM_STATIC_NICK |
> G_PARAM_STATIC_BLURB));
>
> - signalCredParam = g_param_spec_enum("credential",
> - "credential",
> - "credential",
> - VNC_TYPE_DISPLAY_CREDENTIAL,
> - 0,
> - G_PARAM_READABLE);
> -
> signals[VNC_CONNECTED] =
> g_signal_new ("vnc-connected",
> G_OBJECT_CLASS_TYPE (object_class),
> --
> 1.6.3.3
>
> >From 4b3e344ede8099d441afedea8ef3bb2888530e35 Mon Sep 17 00:00:00 2001
> From: Jonh Wendell <jwendell gnome org>
> Date: Thu, 29 Oct 2009 15:06:01 -0300
> Subject: [PATCH 2/2] Only memcpy() if source and destination are different
> X-Spam-Status: Yes, hits=1.000000 required=0.900000, tests=bmf
> X-Spam-Flag: YES
>
> ---
> src/gvnc.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/src/gvnc.c b/src/gvnc.c
> index c413c91..8921a76 100644
> --- a/src/gvnc.c
> +++ b/src/gvnc.c
> @@ -1017,7 +1017,9 @@ gboolean gvnc_set_pixel_format(struct gvnc *gvnc,
>
> gvnc_write(gvnc, pad, 3);
> gvnc_flush(gvnc);
> - memcpy(&gvnc->fmt, fmt, sizeof(*fmt));
> +
> + if (&gvnc->fmt != fmt)
> + memcpy(&gvnc->fmt, fmt, sizeof(*fmt));
>
> return !gvnc_has_error(gvnc);
> }
> --
> 1.6.3.3
>
> _______________________________________________
> gtk-vnc-list mailing list
> gtk-vnc-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-vnc-list
--
|: http://berrange.com/ -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://freshmeat.net/~danielpb/ -o- http://gtk-vnc.sourceforge.net :|
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]