]> git.proxmox.com Git - mirror_frr.git/blobdiff - lib/nexthop.c
*: conform with COMMUNITY.md formatting rules, via 'make indent'
[mirror_frr.git] / lib / nexthop.c
index a094c0e38da624f04badeca8e10ce60c7beccf93..6809a014691b902eff06e9d8625d9c5ef2d806bc 100644 (file)
@@ -71,18 +71,16 @@ int nexthop_same_no_recurse(const struct nexthop *next1,
        return 1;
 }
 
-int
-nexthop_same_firsthop (struct nexthop *next1, struct nexthop *next2)
+int nexthop_same_firsthop(struct nexthop *next1, struct nexthop *next2)
 {
        int type1 = NEXTHOP_FIRSTHOPTYPE(next1->type);
        int type2 = NEXTHOP_FIRSTHOPTYPE(next2->type);
 
        if (type1 != type2)
                return 0;
-       switch (type1)
-       {
+       switch (type1) {
        case NEXTHOP_TYPE_IPV4_IFINDEX:
-               if (! IPV4_ADDR_SAME (&next1->gate.ipv4, &next2->gate.ipv4))
+               if (!IPV4_ADDR_SAME(&next1->gate.ipv4, &next2->gate.ipv4))
                        return 0;
                if (next1->ifindex != next2->ifindex)
                        return 0;
@@ -92,7 +90,7 @@ nexthop_same_firsthop (struct nexthop *next1, struct nexthop *next2)
                        return 0;
                break;
        case NEXTHOP_TYPE_IPV6_IFINDEX:
-               if (! IPV6_ADDR_SAME (&next1->gate.ipv6, &next2->gate.ipv6))
+               if (!IPV6_ADDR_SAME(&next1->gate.ipv6, &next2->gate.ipv6))
                        return 0;
                if (next1->ifindex != next2->ifindex)
                        return 0;
@@ -173,7 +171,8 @@ void copy_nexthops(struct nexthop **tnh, struct nexthop *nh,
                nexthop->flags = nh1->flags;
                memcpy(&nexthop->gate, &nh1->gate, sizeof(nh1->gate));
                memcpy(&nexthop->src, &nh1->src, sizeof(nh1->src));
-               memcpy(&nexthop->rmap_src, &nh1->rmap_src, sizeof(nh1->rmap_src));
+               memcpy(&nexthop->rmap_src, &nh1->rmap_src,
+                      sizeof(nh1->rmap_src));
                nexthop->rparent = rparent;
                if (nh1->nh_label)
                        nexthop_add_labels(nexthop, nh1->nh_label_type,