[gnome-settings-daemon] input-helper: Remove unnecessary g_strdup() invocation
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] input-helper: Remove unnecessary g_strdup() invocation
- Date: Wed, 14 Nov 2012 22:49:47 +0000 (UTC)
commit 7a5731512953687f0d86977f24b0c36f8f4c245c
Author: Colin Walters <walters verbum org>
Date: Wed Nov 14 17:16:00 2012 -0500
input-helper: Remove unnecessary g_strdup() invocation
Noticed because I happened to be reading the code.
https://bugzilla.gnome.org/show_bug.cgi?id=688354
plugins/common/gsd-input-helper.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/plugins/common/gsd-input-helper.c b/plugins/common/gsd-input-helper.c
index cbf757d..06594e9 100644
--- a/plugins/common/gsd-input-helper.c
+++ b/plugins/common/gsd-input-helper.c
@@ -507,7 +507,7 @@ run_custom_command (GdkDevice *device,
argv[2] = (char *) custom_command_to_string (command);
argv[3] = "-i";
argv[4] = g_strdup_printf ("%d", id);
- argv[5] = g_strdup_printf ("%s", gdk_device_get_name (device));
+ argv[5] = (char*) gdk_device_get_name (device);
argv[6] = NULL;
rc = g_spawn_sync (g_get_home_dir (), argv, NULL, G_SPAWN_SEARCH_PATH,
@@ -518,7 +518,6 @@ run_custom_command (GdkDevice *device,
g_free (argv[0]);
g_free (argv[4]);
- g_free (argv[5]);
return (exit_status == 1);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]