summaryrefslogtreecommitdiff
path: root/.clang-format
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2020-11-04 13:53:57 +0100
committerBeniamino Galvani <bgalvani@redhat.com>2020-11-16 16:43:39 +0100
commitdc6ec6ce7b8d9be80a044afa24f6e76b846bef54 (patch)
treee1bc0b437740389024ecd5b76706a390ba1b99d5 /.clang-format
parent740191f7c0a0e7fc016ade80a7743423f050b5c9 (diff)
core: reverse the order of active connections in the manager
When a new active connection is created, it gets added at the beginning of manager's list. This means that the list contains most recently activated connections first. Since the list is doubly-linked, it is possible to efficiently iterate in both directions, so the order of the list is mostly a matter of convention. I think it is preferable to have oldest active connections at the beginning of the list; let's reverse the order. In most places where the list is iterated, the order doesn't matter. Where it does, use the *_prev() variant to maintain the old iteration order.
Diffstat (limited to '.clang-format')
-rw-r--r--.clang-format1
1 files changed, 1 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
index b0233c0d09..33a0c63993 100644
--- a/.clang-format
+++ b/.clang-format
@@ -109,6 +109,7 @@ ForEachMacros: ['c_list_for_each',
'nm_l3_config_data_iter_ip6_route_for_each',
'nm_l3_config_data_iter_obj_for_each',
'nm_manager_for_each_active_connection',
+ 'nm_manager_for_each_active_connection_prev',
'nm_manager_for_each_active_connection_safe',
'nm_manager_for_each_device',
'nm_manager_for_each_device_safe',