diff --git a/lib/skin/colors.c b/lib/skin/colors.c index 84e501202..d99353276 100644 --- a/lib/skin/colors.c +++ b/lib/skin/colors.c @@ -130,9 +130,7 @@ mc_skin_color_get_from_ini_file (mc_skin_t * mc_skin, const gchar * group, const mc_skin_color_t *mc_skin_color, *tmp; values = mc_config_get_string_list (mc_skin->config, group, key, &items_count); - if (values == NULL) - return NULL; - if (*values == NULL) + if (values == NULL || values[0] == NULL) { g_strfreev (values); return NULL; @@ -307,11 +305,7 @@ mc_skin_color_parse_ini_file (mc_skin_t * mc_skin) mc_skin_color_check_bw_mode (mc_skin); orig_groups = groups = mc_config_get_groups (mc_skin->config, &items_count); - - if (groups == NULL) - return FALSE; - - if (*groups == NULL) + if (groups == NULL || groups[0] == NULL) { g_strfreev (groups); return FALSE; diff --git a/src/setup.c b/src/setup.c index 97d01d3d6..88803370b 100644 --- a/src/setup.c +++ b/src/setup.c @@ -605,9 +605,7 @@ load_keys_from_section (const char *terminal, mc_config_t * cfg) } profile_keys++; - - if (values != NULL) - g_strfreev (values); + g_strfreev (values); } g_strfreev (keys); g_free (section_name); @@ -659,9 +657,7 @@ load_keymap_from_section (const char *section_name, GArray * keymap, mc_config_t } profile_keys++; - - if (values != NULL) - g_strfreev (values); + g_strfreev (values); } g_strfreev (keys); }