mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
hmap: use short version of safe loops if possible.
Using 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 for hmap and all its derived types. 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>
This commit is contained in:
committed by
Ilya Maximets
parent
860e69a8c3
commit
9e56549c2b
@@ -417,11 +417,11 @@ delete_chains_from_netdev(struct netdev *netdev, struct tcf_id *id)
|
||||
static int
|
||||
netdev_tc_flow_flush(struct netdev *netdev)
|
||||
{
|
||||
struct ufid_tc_data *data, *next;
|
||||
struct ufid_tc_data *data;
|
||||
int err;
|
||||
|
||||
ovs_mutex_lock(&ufid_lock);
|
||||
HMAP_FOR_EACH_SAFE (data, next, tc_to_ufid_node, &tc_to_ufid) {
|
||||
HMAP_FOR_EACH_SAFE (data, tc_to_ufid_node, &tc_to_ufid) {
|
||||
if (data->netdev != netdev) {
|
||||
continue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user