[PATCH 3/3] Put "break" inside the "if" block in route_compare()
Pavel Roskin
proski at gnu.org
Thu Aug 4 11:59:10 EDT 2011
---
lib/route/route_obj.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/route/route_obj.c b/lib/route/route_obj.c
index d3b09ab..3d208b4 100644
--- a/lib/route/route_obj.c
+++ b/lib/route/route_obj.c
@@ -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;
More information about the libnl
mailing list