mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-21 14:40:46 +02:00
device: rename local variable s_connection and adjust assertions
- avoid g_assert(). Either we want to gracefully assert (g_return_*()) or we want to use assertions that are disabled in production builds (nm_assert()); - rename variable s_connection to s_con. This is how variables for this purpose are commonly called.
This commit is contained in:
parent
54e2c60d34
commit
a058535b9d
1 changed files with 11 additions and 10 deletions
|
|
@ -8427,7 +8427,7 @@ dhcp4_start (NMDevice *self)
|
|||
gs_unref_bytes GBytes *bcast_hwaddr = NULL;
|
||||
gs_unref_bytes GBytes *client_id = NULL;
|
||||
NMConnection *connection;
|
||||
NMSettingConnection *s_connection;
|
||||
NMSettingConnection *s_con;
|
||||
GError *error = NULL;
|
||||
const NMPlatformLink *pllink;
|
||||
|
||||
|
|
@ -8436,8 +8436,8 @@ dhcp4_start (NMDevice *self)
|
|||
|
||||
s_ip4 = nm_connection_get_setting_ip4_config (connection);
|
||||
|
||||
s_connection = nm_connection_get_setting_connection (connection);
|
||||
nm_assert (s_connection);
|
||||
s_con = nm_connection_get_setting_connection (connection);
|
||||
nm_assert (s_con);
|
||||
|
||||
/* Clear old exported DHCP options */
|
||||
nm_dbus_object_clear_and_unexport (&priv->dhcp_data_4.config);
|
||||
|
|
@ -8465,7 +8465,7 @@ dhcp4_start (NMDevice *self)
|
|||
nm_setting_ip_config_get_dhcp_hostname (s_ip4),
|
||||
nm_setting_ip4_config_get_dhcp_fqdn (NM_SETTING_IP4_CONFIG (s_ip4)),
|
||||
get_dhcp_hostname_flags (self, AF_INET),
|
||||
nm_setting_connection_get_mud_url (s_connection),
|
||||
nm_setting_connection_get_mud_url (s_con),
|
||||
client_id,
|
||||
get_dhcp_timeout (self, AF_INET),
|
||||
priv->dhcp_anycast_address,
|
||||
|
|
@ -9216,14 +9216,15 @@ dhcp6_start_with_link_ready (NMDevice *self, NMConnection *connection)
|
|||
GError *error = NULL;
|
||||
guint32 iaid;
|
||||
gboolean iaid_explicit;
|
||||
NMSettingConnection *s_connection;
|
||||
NMSettingConnection *s_con;
|
||||
const NMPlatformIP6Address *ll_addr = NULL;
|
||||
|
||||
g_assert (connection);
|
||||
g_return_val_if_fail (connection, FALSE);
|
||||
|
||||
s_ip6 = nm_connection_get_setting_ip6_config (connection);
|
||||
g_assert (s_ip6);
|
||||
s_connection = nm_connection_get_setting_connection (connection);
|
||||
nm_assert (s_connection);
|
||||
nm_assert (s_ip6);
|
||||
s_con = nm_connection_get_setting_connection (connection);
|
||||
nm_assert (s_con);
|
||||
|
||||
if (priv->ext_ip6_config_captured) {
|
||||
ll_addr = nm_ip6_config_find_first_address (priv->ext_ip6_config_captured,
|
||||
|
|
@ -9258,7 +9259,7 @@ dhcp6_start_with_link_ready (NMDevice *self, NMConnection *connection)
|
|||
nm_setting_ip_config_get_dhcp_send_hostname (s_ip6),
|
||||
nm_setting_ip_config_get_dhcp_hostname (s_ip6),
|
||||
get_dhcp_hostname_flags (self, AF_INET6),
|
||||
nm_setting_connection_get_mud_url (s_connection),
|
||||
nm_setting_connection_get_mud_url (s_con),
|
||||
duid,
|
||||
enforce_duid,
|
||||
iaid,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue