]> granicus.if.org Git - libnl/commitdiff
Put "break" inside the "if" block in route_compare()
authorPavel Roskin <proski@gnu.org>
Thu, 4 Aug 2011 15:59:10 +0000 (11:59 -0400)
committerThomas Graf <tgraf@suug.ch>
Thu, 11 Aug 2011 12:49:51 +0000 (14:49 +0200)
lib/route/route_obj.c

index d3b09ab1f4940107474b2ac629e9fe687b38c5aa..3d208b441b0b967c653b6c3c8ac75a9112d58845 100644 (file)
@@ -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;