Remove static function utils_slist_remove_next()
This commit is contained in:
parent
7cc443e142
commit
58164c65f0
18
src/utils.c
18
src/utils.c
@ -1978,17 +1978,6 @@ gchar *utils_str_remove_chars(gchar *string, const gchar *chars)
|
||||
}
|
||||
|
||||
|
||||
static void utils_slist_remove_next(GSList *node)
|
||||
{
|
||||
GSList *old = node->next;
|
||||
|
||||
g_return_if_fail(old);
|
||||
|
||||
node->next = old->next;
|
||||
g_slist_free_1(old);
|
||||
}
|
||||
|
||||
|
||||
/* Gets list of sorted filenames with no path and no duplicates from user and system config */
|
||||
GSList *utils_get_config_files(const gchar *subdir)
|
||||
{
|
||||
@ -2011,8 +2000,11 @@ GSList *utils_get_config_files(const gchar *subdir)
|
||||
{
|
||||
if (node->next && utils_str_equal(node->next->data, node->data))
|
||||
{
|
||||
g_free(node->next->data);
|
||||
utils_slist_remove_next(node);
|
||||
GSList *old = node->next;
|
||||
|
||||
g_free(old->data);
|
||||
node->next = old->next;
|
||||
g_slist_free1(old);
|
||||
}
|
||||
}
|
||||
g_free(path);
|
||||
|
Loading…
x
Reference in New Issue
Block a user