mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-30 20:33:08 +02:00
glib/*: Use g_slist_free_full() convenience function
This commit is contained in:
parent
c735b54a63
commit
e3d53d5529
@ -587,12 +587,8 @@ tokenize_command_line (const gchar *command_line,
|
|||||||
|
|
||||||
error:
|
error:
|
||||||
g_assert (error == NULL || *error != NULL);
|
g_assert (error == NULL || *error != NULL);
|
||||||
|
|
||||||
if (retval)
|
g_slist_free_full (retval, g_free);
|
||||||
{
|
|
||||||
g_slist_foreach (retval, (GFunc)g_free, NULL);
|
|
||||||
g_slist_free (retval);
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -667,8 +663,7 @@ g_shell_parse_argv (const gchar *command_line,
|
|||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
||||||
g_slist_foreach (tokens, (GFunc)g_free, NULL);
|
g_slist_free_full (tokens, g_free);
|
||||||
g_slist_free (tokens);
|
|
||||||
|
|
||||||
if (argcp)
|
if (argcp)
|
||||||
*argcp = argc;
|
*argcp = argc;
|
||||||
@ -684,8 +679,7 @@ g_shell_parse_argv (const gchar *command_line,
|
|||||||
|
|
||||||
g_assert (error == NULL || *error != NULL);
|
g_assert (error == NULL || *error != NULL);
|
||||||
g_strfreev (argv);
|
g_strfreev (argv);
|
||||||
g_slist_foreach (tokens, (GFunc) g_free, NULL);
|
g_slist_free_full (tokens, g_free);
|
||||||
g_slist_free (tokens);
|
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -268,8 +268,7 @@ test_match_next (gconstpointer d)
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_regex_unref (regex);
|
g_regex_unref (regex);
|
||||||
g_slist_foreach (matches, free_match, NULL);
|
g_slist_free_full (matches, free_match);
|
||||||
g_slist_free (matches);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define TEST_MATCH_NEXT0(_pattern, _string, _string_len, _start_position) { \
|
#define TEST_MATCH_NEXT0(_pattern, _string, _string_len, _start_position) { \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user