libnm: always initialize default values for "direct" properties
We encode the default value "direct" properties in the GParamSpec. But we also avoid CONSTRUCT properties, because they have an overhead and they are generally odd for the settings. So up to now, it was cumbersome to explicitly set the default value, but it was also error prone. Avoid that by always initializing the default value for our "direct" properties.
This commit is contained in:
@@ -6063,15 +6063,13 @@ _nm_setting_ip_config_private_init(gpointer self, NMSettingIPConfigPrivate *priv
|
||||
{
|
||||
nm_assert(NM_IS_SETTING_IP_CONFIG(self));
|
||||
|
||||
priv->dns = g_ptr_array_new_with_free_func(g_free);
|
||||
priv->dns_search = g_ptr_array_new_with_free_func(g_free);
|
||||
priv->addresses = g_ptr_array_new_with_free_func((GDestroyNotify) nm_ip_address_unref);
|
||||
priv->routes = g_ptr_array_new_with_free_func((GDestroyNotify) nm_ip_route_unref);
|
||||
priv->route_metric = -1;
|
||||
priv->dhcp_send_hostname = TRUE;
|
||||
priv->may_fail = TRUE;
|
||||
priv->dad_timeout = -1;
|
||||
priv->required_timeout = -1;
|
||||
priv->dns = g_ptr_array_new_with_free_func(g_free);
|
||||
priv->dns_search = g_ptr_array_new_with_free_func(g_free);
|
||||
priv->addresses = g_ptr_array_new_with_free_func((GDestroyNotify) nm_ip_address_unref);
|
||||
priv->routes = g_ptr_array_new_with_free_func((GDestroyNotify) nm_ip_route_unref);
|
||||
priv->route_metric = -1;
|
||||
priv->dad_timeout = -1;
|
||||
priv->required_timeout = -1;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Reference in New Issue
Block a user