mirror of
https://github.com/openharmony/third_party_libnl.git
synced 2026-07-20 23:45:55 -04:00
Put "break" inside the "if" block in route_compare()
This commit is contained in:
committed by
Thomas Graf
parent
7701c8572f
commit
bbe5e94253
@@ -346,9 +346,10 @@ static int route_compare(struct nl_object *_a, struct nl_object *_b,
|
||||
found = 0;
|
||||
nl_list_for_each_entry(nh_b, &b->rt_nexthops,
|
||||
rtnh_list) {
|
||||
if (!rtnl_route_nh_compare(nh_a, nh_b, ~0, 0))
|
||||
if (!rtnl_route_nh_compare(nh_a, nh_b, ~0, 0)) {
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
goto nh_mismatch;
|
||||
@@ -360,9 +361,10 @@ static int route_compare(struct nl_object *_a, struct nl_object *_b,
|
||||
found = 0;
|
||||
nl_list_for_each_entry(nh_a, &a->rt_nexthops,
|
||||
rtnh_list) {
|
||||
if (!rtnl_route_nh_compare(nh_a, nh_b, ~0, 0))
|
||||
if (!rtnl_route_nh_compare(nh_a, nh_b, ~0, 0)) {
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
goto nh_mismatch;
|
||||
|
||||
Reference in New Issue
Block a user