all: avoid useless cast of g_free() to GDestroyNotify
This commit is contained in:
@@ -5654,7 +5654,7 @@ _nm_utils_team_config_get (const char *conf,
|
||||
g_ptr_array_free (data, TRUE);
|
||||
|
||||
} else if (json_is_array (json_element)) {
|
||||
GPtrArray *data = g_ptr_array_new_with_free_func ((GDestroyNotify) g_free);
|
||||
GPtrArray *data = g_ptr_array_new_with_free_func (g_free);
|
||||
json_t *str_element;
|
||||
int index;
|
||||
|
||||
|
@@ -1002,7 +1002,7 @@ test_runner_loadbalance_sync_from_config (void)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *tx_hash = NULL;
|
||||
|
||||
tx_hash = g_ptr_array_new_with_free_func ((GDestroyNotify) g_free);
|
||||
tx_hash = g_ptr_array_new_with_free_func (g_free);
|
||||
g_ptr_array_add (tx_hash, g_strdup ("eth"));
|
||||
g_ptr_array_add (tx_hash, g_strdup ("ipv4"));
|
||||
g_ptr_array_add (tx_hash, g_strdup ("ipv6"));
|
||||
@@ -1039,7 +1039,7 @@ test_runner_lacp_sync_from_config (void)
|
||||
{
|
||||
gs_unref_ptrarray GPtrArray *tx_hash = NULL;
|
||||
|
||||
tx_hash = g_ptr_array_new_with_free_func ((GDestroyNotify) g_free);
|
||||
tx_hash = g_ptr_array_new_with_free_func (g_free);
|
||||
g_ptr_array_add (tx_hash, g_strdup ("eth"));
|
||||
g_ptr_array_add (tx_hash, g_strdup ("ipv4"));
|
||||
g_ptr_array_add (tx_hash, g_strdup ("ipv6"));
|
||||
|
@@ -321,7 +321,7 @@ nm_setting_to_hash (NMSetting *setting, NMSettingHashFlags flags)
|
||||
property_specs = g_object_class_list_properties (G_OBJECT_GET_CLASS (setting), &n_property_specs);
|
||||
|
||||
hash = g_hash_table_new_full (g_str_hash, g_str_equal,
|
||||
(GDestroyNotify) g_free, destroy_gvalue);
|
||||
g_free, destroy_gvalue);
|
||||
|
||||
for (i = 0; i < n_property_specs; i++) {
|
||||
GParamSpec *prop_spec = property_specs[i];
|
||||
|
@@ -491,7 +491,7 @@ nm_utils_gvalue_hash_dup (GHashTable *hash)
|
||||
g_return_val_if_fail (hash != NULL, NULL);
|
||||
|
||||
table = g_hash_table_new_full (g_str_hash, g_str_equal,
|
||||
(GDestroyNotify) g_free,
|
||||
g_free,
|
||||
value_destroy);
|
||||
|
||||
g_hash_table_foreach (hash, value_dup, table);
|
||||
|
@@ -94,11 +94,11 @@ nm_supplicant_config_init (NMSupplicantConfig * self)
|
||||
NMSupplicantConfigPrivate *priv = NM_SUPPLICANT_CONFIG_GET_PRIVATE (self);
|
||||
|
||||
priv->config = g_hash_table_new_full (nm_str_hash, g_str_equal,
|
||||
(GDestroyNotify) g_free,
|
||||
g_free,
|
||||
(GDestroyNotify) config_option_free);
|
||||
|
||||
priv->blobs = g_hash_table_new_full (nm_str_hash, g_str_equal,
|
||||
(GDestroyNotify) g_free,
|
||||
g_free,
|
||||
(GDestroyNotify) g_bytes_unref);
|
||||
|
||||
priv->ap_scan = 1;
|
||||
|
Reference in New Issue
Block a user