From 5fa187fd69c9a352bae38cbced4120dc942fc7a6 Mon Sep 17 00:00:00 2001 From: monsta Date: Mon, 7 Aug 2017 18:04:27 +0300 Subject: open-terminal: don't use excessive string duplication make c538ddf86852c5618512c8be187828de3d5e4fee a bit simpler --- open-terminal/caja-open-terminal.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/open-terminal/caja-open-terminal.c b/open-terminal/caja-open-terminal.c index 733a90f..449ace6 100644 --- a/open-terminal/caja-open-terminal.c +++ b/open-terminal/caja-open-terminal.c @@ -280,7 +280,7 @@ open_terminal_callback (CajaMenuItem *item, CajaFileInfo *file_info) { GdkDisplay *display; - gchar *display_str; + const gchar *display_str; const gchar *old_display_str; gchar *uri; gchar **argv, *terminal_exec; @@ -339,7 +339,7 @@ open_terminal_callback (CajaMenuItem *item, screen = g_object_get_data (G_OBJECT (item), "CajaOpenTerminal::screen"); display = gdk_screen_get_display (screen); if (screen != NULL) { - display_str = g_strdup (gdk_display_get_name (display)); + display_str = gdk_display_get_name (display); g_setenv ("DISPLAY", display_str, TRUE); } @@ -415,7 +415,6 @@ open_terminal_callback (CajaMenuItem *item, g_strfreev (argv); g_free (terminal_exec); g_free (working_directory); - g_free (display_str); } static CajaMenuItem * -- cgit v1.2.1