mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-08 22:00:29 +01:00
all: replace cleanup macro "gs_free_slist" by "nm_auto_free_slist"
This commit is contained in:
parent
426a4c9d50
commit
c7a724fd53
3 changed files with 6 additions and 15 deletions
|
|
@ -98,15 +98,6 @@ NM_AUTO_DEFINE_FCN0 (GPtrArray *, gs_local_ptrarray_unref, g_ptr_array_unref);
|
|||
#define gs_unref_hashtable nm_auto(gs_local_hashtable_unref)
|
||||
NM_AUTO_DEFINE_FCN0 (GHashTable *, gs_local_hashtable_unref, g_hash_table_unref);
|
||||
|
||||
/**
|
||||
* gs_free_slist:
|
||||
*
|
||||
* Call g_slist_free() on a variable location when it goes out
|
||||
* of scope.
|
||||
*/
|
||||
#define gs_free_slist nm_auto(gs_local_free_slist)
|
||||
NM_AUTO_DEFINE_FCN0 (GSList *, gs_local_free_slist, g_slist_free);
|
||||
|
||||
/**
|
||||
* gs_unref_bytes:
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1020,8 +1020,8 @@ read_config (GKeyFile *keyfile,
|
|||
} else {
|
||||
gs_free char *old_sval = nm_config_keyfile_get_value (keyfile, group, base_key, NM_CONFIG_GET_VALUE_TYPE_SPEC);
|
||||
gs_free char *new_sval = nm_config_keyfile_get_value (kf, group, key, NM_CONFIG_GET_VALUE_TYPE_SPEC);
|
||||
gs_free_slist GSList *old_specs = nm_match_spec_split (old_sval);
|
||||
gs_free_slist GSList *new_specs = nm_match_spec_split (new_sval);
|
||||
nm_auto_free_slist GSList *old_specs = nm_match_spec_split (old_sval);
|
||||
nm_auto_free_slist GSList *new_specs = nm_match_spec_split (new_sval);
|
||||
|
||||
/* the key is a device spec. This is a special kind of string-list, that
|
||||
* we must split differently. */
|
||||
|
|
@ -1049,7 +1049,7 @@ read_config (GKeyFile *keyfile,
|
|||
if (is_string_list)
|
||||
nm_config_keyfile_set_string_list (keyfile, group, base_key, (const char *const*) new->pdata, new->len);
|
||||
else {
|
||||
gs_free_slist GSList *specs = NULL;
|
||||
nm_auto_free_slist GSList *specs = NULL;
|
||||
gs_free char *specs_joined = NULL;
|
||||
|
||||
g_ptr_array_add (new, NULL);
|
||||
|
|
|
|||
|
|
@ -801,7 +801,7 @@ test_connection_match_ip4_routes1 (void)
|
|||
{
|
||||
gs_unref_object NMConnection *orig = NULL, *copy = NULL;
|
||||
NMConnection *matched;
|
||||
gs_free_slist GSList *connections = NULL;
|
||||
nm_auto_free_slist GSList *connections = NULL;
|
||||
NMSettingIPConfig *s_ip4;
|
||||
|
||||
orig = _match_connection_new ();
|
||||
|
|
@ -837,7 +837,7 @@ test_connection_match_ip4_routes2 (void)
|
|||
{
|
||||
gs_unref_object NMConnection *orig = NULL, *copy = NULL;
|
||||
NMConnection *matched;
|
||||
gs_free_slist GSList *connections = NULL;
|
||||
nm_auto_free_slist GSList *connections = NULL;
|
||||
NMSettingIPConfig *s_ip4;
|
||||
|
||||
orig = _match_connection_new ();
|
||||
|
|
@ -876,7 +876,7 @@ test_connection_match_ip6_routes (void)
|
|||
{
|
||||
gs_unref_object NMConnection *orig = NULL, *copy = NULL;
|
||||
NMConnection *matched;
|
||||
gs_free_slist GSList *connections = NULL;
|
||||
nm_auto_free_slist GSList *connections = NULL;
|
||||
NMSettingIPConfig *s_ip6;
|
||||
|
||||
orig = _match_connection_new ();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue