diff options
author | Adrian Moreno <amorenoz@redhat.com> | 2022-03-23 12:56:14 +0100 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2022-03-30 16:59:02 +0200 |
commit | e9bf5bffb020e3dca4104118e15c69242bc12e33 (patch) | |
tree | 01e35216faf311d3313c6f20464dc884c2dc1f81 /lib/netdev-afxdp.c | |
parent | d4566085edf50033087652f35f92b9b77cbec70f (diff) | |
download | openvswitch-e9bf5bffb020e3dca4104118e15c69242bc12e33.tar.gz |
list: use short version of safe loops if possible.
Using the SHORT version of the *_SAFE loops makes the code cleaner
and less error-prone. So, use the SHORT version and remove the extra
variable when possible.
In order to be able to use both long and short versions without changing
the name of the macro for all the clients, overload the existing name
and select the appropriate version depending on the number of arguments.
Acked-by: Dumitru Ceara <dceara@redhat.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Adrian Moreno <amorenoz@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'lib/netdev-afxdp.c')
-rw-r--r-- | lib/netdev-afxdp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/netdev-afxdp.c b/lib/netdev-afxdp.c index 482400d8d..ca3f2431e 100644 --- a/lib/netdev-afxdp.c +++ b/lib/netdev-afxdp.c @@ -235,11 +235,11 @@ netdev_afxdp_cleanup_unused_pool(struct unused_pool *pool) static void netdev_afxdp_sweep_unused_pools(void *aux OVS_UNUSED) { - struct unused_pool *pool, *next; + struct unused_pool *pool; unsigned int count; ovs_mutex_lock(&unused_pools_mutex); - LIST_FOR_EACH_SAFE (pool, next, list_node, &unused_pools) { + LIST_FOR_EACH_SAFE (pool, list_node, &unused_pools) { count = umem_pool_count(&pool->umem_info->mpool); ovs_assert(count + pool->lost_in_rings <= NUM_FRAMES); |