Commit 9a55f662 authored by Lubomir Rintel's avatar Lubomir Rintel 🥕

device/trivial: rename nm_device_check_ip_failed()

This saves 110 bytes (which is 1/29986680757 of the size of the books in the
Library of Congress).

Also, the function is static; not using the nm_device_ prefix is preferred.
parent 751a37bf
...@@ -3626,12 +3626,12 @@ nm_device_activate_schedule_stage2_device_config (NMDevice *self) ...@@ -3626,12 +3626,12 @@ nm_device_activate_schedule_stage2_device_config (NMDevice *self)
} }
/* /*
* nm_device_check_ip_failed * check_ip_failed
* *
* Progress the device to appropriate state if both IPv4 and IPv6 failed * Progress the device to appropriate state if both IPv4 and IPv6 failed
*/ */
static void static void
nm_device_check_ip_failed (NMDevice *self, gboolean may_fail) check_ip_failed (NMDevice *self, gboolean may_fail)
{ {
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self); NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE (self);
NMDeviceState state; NMDeviceState state;
...@@ -3919,14 +3919,14 @@ nm_device_handle_ipv4ll_event (sd_ipv4ll *ll, int event, void *data) ...@@ -3919,14 +3919,14 @@ nm_device_handle_ipv4ll_event (sd_ipv4ll *ll, int event, void *data)
if (r < 0) { if (r < 0) {
_LOGE (LOGD_AUTOIP4, "invalid IPv4 link-local address received, error %d.", r); _LOGE (LOGD_AUTOIP4, "invalid IPv4 link-local address received, error %d.", r);
priv->ip4_state = IP_FAIL; priv->ip4_state = IP_FAIL;
nm_device_check_ip_failed (self, FALSE); check_ip_failed (self, FALSE);
return; return;
} }
if ((address.s_addr & IPV4LL_NETMASK) != IPV4LL_NETWORK) { if ((address.s_addr & IPV4LL_NETMASK) != IPV4LL_NETWORK) {
_LOGE (LOGD_AUTOIP4, "invalid address %08x received (not link-local).", address.s_addr); _LOGE (LOGD_AUTOIP4, "invalid address %08x received (not link-local).", address.s_addr);
priv->ip4_state = IP_FAIL; priv->ip4_state = IP_FAIL;
nm_device_check_ip_failed (self, FALSE); check_ip_failed (self, FALSE);
return; return;
} }
...@@ -3934,7 +3934,7 @@ nm_device_handle_ipv4ll_event (sd_ipv4ll *ll, int event, void *data) ...@@ -3934,7 +3934,7 @@ nm_device_handle_ipv4ll_event (sd_ipv4ll *ll, int event, void *data)
if (config == NULL) { if (config == NULL) {
_LOGE (LOGD_AUTOIP4, "failed to get IPv4LL config"); _LOGE (LOGD_AUTOIP4, "failed to get IPv4LL config");
priv->ip4_state = IP_FAIL; priv->ip4_state = IP_FAIL;
nm_device_check_ip_failed (self, FALSE); check_ip_failed (self, FALSE);
return; return;
} }
...@@ -3945,7 +3945,7 @@ nm_device_handle_ipv4ll_event (sd_ipv4ll *ll, int event, void *data) ...@@ -3945,7 +3945,7 @@ nm_device_handle_ipv4ll_event (sd_ipv4ll *ll, int event, void *data)
if (!ip4_config_merge_and_apply (self, config, TRUE, NULL)) { if (!ip4_config_merge_and_apply (self, config, TRUE, NULL)) {
_LOGE (LOGD_AUTOIP4, "failed to update IP4 config for autoip change."); _LOGE (LOGD_AUTOIP4, "failed to update IP4 config for autoip change.");
priv->ip4_state = IP_FAIL; priv->ip4_state = IP_FAIL;
nm_device_check_ip_failed (self, FALSE); check_ip_failed (self, FALSE);
} }
} else } else
g_assert_not_reached (); g_assert_not_reached ();
...@@ -3955,7 +3955,7 @@ nm_device_handle_ipv4ll_event (sd_ipv4ll *ll, int event, void *data) ...@@ -3955,7 +3955,7 @@ nm_device_handle_ipv4ll_event (sd_ipv4ll *ll, int event, void *data)
default: default:
_LOGW (LOGD_AUTOIP4, "IPv4LL address no longer valid after event %d.", event); _LOGW (LOGD_AUTOIP4, "IPv4LL address no longer valid after event %d.", event);
priv->ip4_state = IP_FAIL; priv->ip4_state = IP_FAIL;
nm_device_check_ip_failed (self, FALSE); check_ip_failed (self, FALSE);
} }
} }
...@@ -6304,7 +6304,7 @@ activate_stage3_ip_config_start (NMDevice *self) ...@@ -6304,7 +6304,7 @@ activate_stage3_ip_config_start (NMDevice *self)
&& !nm_device_activate_stage3_ip6_start (self)) && !nm_device_activate_stage3_ip6_start (self))
return; return;
nm_device_check_ip_failed (self, TRUE); check_ip_failed (self, TRUE);
} }
static gboolean static gboolean
...@@ -6439,7 +6439,7 @@ activate_stage4_ip4_config_timeout (NMDevice *self) ...@@ -6439,7 +6439,7 @@ activate_stage4_ip4_config_timeout (NMDevice *self)
priv->ip4_state = IP_FAIL; priv->ip4_state = IP_FAIL;
nm_device_check_ip_failed (self, FALSE); check_ip_failed (self, FALSE);
} }
...@@ -6499,7 +6499,7 @@ activate_stage4_ip6_config_timeout (NMDevice *self) ...@@ -6499,7 +6499,7 @@ activate_stage4_ip6_config_timeout (NMDevice *self)
priv->ip6_state = IP_FAIL; priv->ip6_state = IP_FAIL;
nm_device_check_ip_failed (self, FALSE); check_ip_failed (self, FALSE);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment