diff options
author | Thomas Haller <thaller@redhat.com> | 2018-03-29 08:52:45 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-04-04 14:02:13 +0200 |
commit | 8de522fad0144e1ae2ba80dfb9d6b1da31b42866 (patch) | |
tree | f12cc0ee7fd939c40d48bcfd9fc070bc56512569 /src/nm-checkpoint.c | |
parent | a399e2b8ffc10510023c0e4671f18d6554d899e0 (diff) | |
download | NetworkManager-8de522fad0144e1ae2ba80dfb9d6b1da31b42866.tar.gz |
core: add macro for iterating CList of devices of NMManager
I find it slightly nicer and explict. Also, the list elements
are strictly speaking private, we should better not explicitly
use them outside of NMManager/NMDevice. The macro hides this.
Diffstat (limited to 'src/nm-checkpoint.c')
-rw-r--r-- | src/nm-checkpoint.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/nm-checkpoint.c b/src/nm-checkpoint.c index 631765c2af..c117ab9960 100644 --- a/src/nm-checkpoint.c +++ b/src/nm-checkpoint.c @@ -348,11 +348,10 @@ next_dev: } if (NM_FLAGS_HAS (priv->flags, NM_CHECKPOINT_CREATE_FLAG_DISCONNECT_NEW_DEVICES)) { - const CList *all_devices; + const CList *tmp_lst; NMDeviceState state; - all_devices = nm_manager_get_devices (priv->manager); - c_list_for_each_entry (device, all_devices, devices_lst) { + nm_manager_for_each_device (priv->manager, device, tmp_lst) { if (g_hash_table_contains (priv->devices, device)) continue; state = nm_device_get_state (device); |