aboutsummaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-09-08 18:47:17 +0000
committerTarmac <Unknown>2013-09-08 18:47:17 +0000
commitdd9d2e36dfda0eb3b321a1ed94f8d27739265b2a (patch)
treeaa8f278f8a81546120ed6acd37da88dc0eea343d /src/utils.c
parentddebe3c47040869cb8fe94729c43f10f2b763550 (diff)
parent05d0c98b1918fa97369e8b99f6848c19d7b97099 (diff)
downloadayatana-indicator-datetime-dd9d2e36dfda0eb3b321a1ed94f8d27739265b2a.tar.gz
ayatana-indicator-datetime-dd9d2e36dfda0eb3b321a1ed94f8d27739265b2a.tar.bz2
ayatana-indicator-datetime-dd9d2e36dfda0eb3b321a1ed94f8d27739265b2a.zip
Minor changes that eliminate unnecessary temporary strings.
Approved by Ted Gould, PS Jenkins bot.
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/utils.c b/src/utils.c
index b99de94..50d896d 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -134,9 +134,9 @@ T_(const char *msg)
LC_MESSAGES directory, so we won't find any translation there.
*/
char *message_locale = g_strdup(setlocale(LC_MESSAGES, NULL));
- char *time_locale = g_strdup(setlocale(LC_TIME, NULL));
+ const char *time_locale = setlocale (LC_TIME, NULL);
char *language = g_strdup(g_getenv("LANGUAGE"));
- char *rv;
+ const char *rv;
if (language)
g_unsetenv("LANGUAGE");
setlocale(LC_MESSAGES, time_locale);
@@ -149,7 +149,6 @@ T_(const char *msg)
if (language)
g_setenv("LANGUAGE", language, TRUE);
g_free(message_locale);
- g_free(time_locale);
g_free(language);
return rv;
}