[Xfce4-commits] <xfconf:master> Do not dup strings.

Nick Schermer noreply at xfce.org
Sun Apr 1 18:12:01 CEST 2012


Updating branch refs/heads/master
         to dceb415dadda97b0d2cba7784603ff7c1c731484 (commit)
       from c14d8d9563aebd05551ff5418d0411dfbbbc71d1 (commit)

commit dceb415dadda97b0d2cba7784603ff7c1c731484
Author: Nick Schermer <nick at xfce.org>
Date:   Sun Apr 1 17:59:05 2012 +0200

    Do not dup strings.
    
    g_value_copy makes a duplicated of the value in any case for
    the cache and the value is unset at the end of the function,
    so it can be static safely.

 xfconf/xfconf-channel.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xfconf/xfconf-channel.c b/xfconf/xfconf-channel.c
index 43faa70..01ecd7c 100644
--- a/xfconf/xfconf-channel.c
+++ b/xfconf/xfconf-channel.c
@@ -1021,7 +1021,7 @@ xfconf_channel_set_string(XfconfChannel *channel,
     g_return_val_if_fail(XFCONF_IS_CHANNEL(channel) && property && value, FALSE);
 
     g_value_init(&val, G_TYPE_STRING);
-    g_value_set_string(&val, value);
+    g_value_set_static_string(&val, value);
 
     ret = xfconf_channel_set_internal(channel, property, &val);
 


More information about the Xfce4-commits mailing list