Skip to content

Commit

Permalink
bgpd: Cleanup indenting for subgroup_default_originate
Browse files Browse the repository at this point in the history
Part of the subgroup_default_originate function was indented
very deeply.  Clean this up some.

Signed-off-by: Donald Sharp <[email protected]>
  • Loading branch information
donaldsharp committed Mar 5, 2024
1 parent f0905ab commit 57c7e76
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions bgpd/bgp_updgrp_adv.c
Original file line number Diff line number Diff line change
Expand Up @@ -953,22 +953,22 @@ void subgroup_default_originate(struct update_subgroup *subgrp, int withdraw)
if (dest) {
for (pi = bgp_dest_get_bgp_path_info(dest); pi;
pi = pi->next) {
if (CHECK_FLAG(pi->flags, BGP_PATH_SELECTED)) {
if (subgroup_announce_check(
dest, pi, subgrp,
bgp_dest_get_prefix(dest),
&attr, NULL)) {
struct attr *default_attr =
bgp_attr_intern(&attr);

if (!bgp_adj_out_set_subgroup(
dest, subgrp,
default_attr, pi))
bgp_attr_flush(
default_attr);
} else
bgp_attr_flush(&attr);
}
if (!CHECK_FLAG(pi->flags, BGP_PATH_SELECTED))
continue;

if (subgroup_announce_check(
dest, pi, subgrp,
bgp_dest_get_prefix(dest), &attr,
NULL)) {
struct attr *default_attr =
bgp_attr_intern(&attr);

if (!bgp_adj_out_set_subgroup(
dest, subgrp, default_attr,
pi))
bgp_attr_flush(default_attr);
} else
bgp_attr_flush(&attr);
}
bgp_dest_unlock_node(dest);
}
Expand Down

0 comments on commit 57c7e76

Please sign in to comment.