diff options
author | Thomas Haller <thaller@redhat.com> | 2022-04-02 13:33:00 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-04-02 13:33:00 +0200 |
commit | 976e2eeb934010f5029f811a977fdfc07b1dfbe7 (patch) | |
tree | 41c078f972f69603d917c4e6f12fd1225a358922 | |
parent | eaba1f30a6450618a7219622629b294736ebb8ec (diff) | |
download | NetworkManager-976e2eeb934010f5029f811a977fdfc07b1dfbe7.tar.gz |
device: cleanup code path in nm_device_get_ip_iface_identifier()
-rw-r--r-- | src/core/devices/nm-device.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c index 7023a847db..84c1a08e8e 100644 --- a/src/core/devices/nm-device.c +++ b/src/core/devices/nm-device.c @@ -4724,7 +4724,7 @@ nm_device_get_ip_iface_identifier(NMDevice *self, gboolean *out_is_token) { NMSettingIP6Config *s_ip6; - const char *token = NULL; + const char *token; g_return_val_if_fail(NM_IS_DEVICE(self), FALSE); @@ -4736,13 +4736,12 @@ nm_device_get_ip_iface_identifier(NMDevice *self, g_return_val_if_fail(s_ip6, FALSE); token = nm_setting_ip6_config_get_token(s_ip6); - if (token) + if (token) { NM_SET_OUT(out_is_token, TRUE); + return nm_utils_ipv6_interface_identifier_get_from_token(iid, token); + } } - if (token) - return nm_utils_ipv6_interface_identifier_get_from_token(iid, token); - else - return NM_DEVICE_GET_CLASS(self)->get_ip_iface_identifier(self, iid); + return NM_DEVICE_GET_CLASS(self)->get_ip_iface_identifier(self, iid); } const char * |