summary refs log tree commit diff stats
path: root/src/common/cfgfiles.c
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2015-11-09 14:51:48 -0500
committerPatrick Griffis <tingping@tingping.se>2015-11-09 14:51:48 -0500
commit295061f4619ff75aedad8b758e439ff1f21b5e47 (patch)
tree5b74abf7b7d6e92145ce942fb2e2e231e162a35b /src/common/cfgfiles.c
parent0bd15d435af6144db6cd3b92e77dd7c0a26d72c9 (diff)
Fix incorrect const usage
Diffstat (limited to 'src/common/cfgfiles.c')
-rw-r--r--src/common/cfgfiles.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c
index f68892e4..73353d1d 100644
--- a/src/common/cfgfiles.c
+++ b/src/common/cfgfiles.c
@@ -585,16 +585,17 @@ const struct prefs vars[] =
 	{0, 0, 0},
 };
 
-static const char *
-convert_with_fallback (const char *str, const char *fallback)
+
+static char *
+convert_with_fallback (char *str, const char *fallback)
 {
-	const char *utf;
+	char *utf;
 
 #ifndef WIN32
 	/* On non-Windows, g_get_user_name and g_get_real_name return a string in system locale, so convert it to utf-8. */
 	utf = g_locale_to_utf8 (str, -1, NULL, NULL, 0);
 
-	g_free ((char*)str);
+	g_free (str);
 
 	/* The returned string is NULL if conversion from locale to utf-8 failed for any reason. Return the fallback. */
 	if (!utf)
@@ -711,7 +712,8 @@ get_default_spell_languages (void)
 void
 load_default_config(void)
 {
-	const char *username, *realname, *font, *langs;
+	char *username, *realname, *langs;
+	const char *font;
 	char *sp;
 #ifdef WIN32
 	wchar_t* roaming_path_wide;
@@ -904,9 +906,9 @@ load_default_config(void)
 	if (sp)
 		sp[0] = 0;	/* spaces in username would break the login */
 
-	g_free ((char *)username);
-	g_free ((char *)realname);
-	g_free ((char *)langs);
+	g_free (username);
+	g_free (realname);
+	g_free (langs);
 }
 
 int