From bbe5e9425366c19ae152dc2c1a09b8fc348807f2 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Thu, 4 Aug 2011 11:59:10 -0400 Subject: [PATCH] Put "break" inside the "if" block in route_compare() --- lib/route/route_obj.c | 6 ++++-- 1 file 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;