Cleanup char* to auto_gchar gchar* for prefs_get_string
Necessity explained in #1819
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user