mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 01:20:07 +01:00
nmcli: move an assignment down to where the value needed
It's happier there. No change in behavior. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1317
This commit is contained in:
parent
a3ce5aa50e
commit
d3d1cd2b3e
1 changed files with 2 additions and 2 deletions
|
|
@ -539,8 +539,6 @@ nmc_find_active_connection(const GPtrArray *active_cons,
|
|||
NMActiveConnection *candidate = g_ptr_array_index(active_cons, i);
|
||||
const char *v, *v_num;
|
||||
|
||||
con = nm_active_connection_get_connection(candidate);
|
||||
|
||||
/* When filter_type is NULL, compare connection ID (filter_val)
|
||||
* against all types. Otherwise, only compare against the specific
|
||||
* type. If 'path' or 'apath' filter types are specified, comparison
|
||||
|
|
@ -562,6 +560,8 @@ nmc_find_active_connection(const GPtrArray *active_cons,
|
|||
goto found;
|
||||
}
|
||||
|
||||
con = nm_active_connection_get_connection(candidate);
|
||||
|
||||
if (NM_IN_STRSET(filter_type, NULL, "path")) {
|
||||
v = con ? nm_connection_get_path(NM_CONNECTION(con)) : NULL;
|
||||
v_num = nm_utils_dbus_path_get_last_component(v);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue