Cleanup char* to auto_gchar gchar* for prefs_get_string

Necessity explained in #1819
This commit is contained in:
John Hernandez
2023-06-13 22:01:08 +02:00
parent 1c102fec27
commit 4a70f5f513
19 changed files with 133 additions and 275 deletions

View File

@@ -707,13 +707,12 @@ theme_hash_attrs(const char* str)
{
color_profile profile = COLOR_PROFILE_DEFAULT;
char* color_pref = prefs_get_string(PREF_COLOR_NICK);
auto_gchar gchar* color_pref = prefs_get_string(PREF_COLOR_NICK);
if (strcmp(color_pref, "redgreen") == 0) {
profile = COLOR_PROFILE_REDGREEN_BLINDNESS;
} else if (strcmp(color_pref, "blue") == 0) {
profile = COLOR_PROFILE_BLUE_BLINDNESS;
}
g_free(color_pref);
return COLOR_PAIR(color_pair_cache_hash_str(str, profile));
}