[gnome-session] gsm: Do not uselessly duplicate a string
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session] gsm: Do not uselessly duplicate a string
- Date: Thu, 26 May 2011 10:38:29 +0000 (UTC)
commit 9f25b7599ba016f8da7275afa4c3f8e194678734
Author: Vincent Untz <vuntz gnome org>
Date: Thu May 26 12:29:22 2011 +0200
gsm: Do not uselessly duplicate a string
gnome-session/gsm-xsmp-client.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/gnome-session/gsm-xsmp-client.c b/gnome-session/gsm-xsmp-client.c
index 4769020..4d745aa 100644
--- a/gnome-session/gsm-xsmp-client.c
+++ b/gnome-session/gsm-xsmp-client.c
@@ -544,19 +544,19 @@ static void
set_desktop_file_keys_from_client (GsmClient *client,
GKeyFile *keyfile)
{
- SmProp *prop;
- char *name;
- char *comment;
+ SmProp *prop;
+ const char *name;
+ char *comment;
prop = find_property (GSM_XSMP_CLIENT (client), SmProgram, NULL);
if (prop) {
- name = g_strdup (prop->vals[0].value);
+ name = prop->vals[0].value;
} else {
/* It'd be really surprising to reach this code: if we're here,
* then the XSMP client already has set several XSMP
* properties. But it could still be that SmProgram is not set.
*/
- name = g_strdup (_("Remembered Application"));
+ name = _("Remembered Application");
}
comment = g_strdup_printf ("Client %s which was automatically saved",
@@ -587,7 +587,6 @@ set_desktop_file_keys_from_client (GsmClient *client,
G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY,
TRUE);
- g_free (name);
g_free (comment);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]