diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2022-08-10 18:14:23 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2022-08-11 13:30:32 -0400 |
| commit | fe61ceaee75dbba770f39af7670aa85b8d6ccacb (patch) | |
| tree | 184360281a451a372a547d04615cecf9881a229d /ospfd/ospf_interface.c | |
| parent | 812e6c78c10970d0c5e7e5f3d1ed54dc95736244 (diff) | |
ospfd: Cleanup indentation surrounding oi->nbr
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'ospfd/ospf_interface.c')
| -rw-r--r-- | ospfd/ospf_interface.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index 633ab05131..a4f4cd216a 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -66,15 +66,16 @@ int ospf_interface_neighbor_count(struct ospf_interface *oi) for (rn = route_top(oi->nbrs); rn; rn = route_next(rn)) { nbr = rn->info; - if (nbr) { - /* Do not show myself. */ - if (nbr == oi->nbr_self) - continue; - /* Down state is not shown. */ - if (nbr->state == NSM_Down) - continue; - count++; - } + if (!nbr) + continue; + + /* Do not show myself. */ + if (nbr == oi->nbr_self) + continue; + /* Down state is not shown. */ + if (nbr->state == NSM_Down) + continue; + count++; } return count; @@ -315,10 +316,11 @@ void ospf_if_cleanup(struct ospf_interface *oi) } /* send Neighbor event KillNbr to all associated neighbors. */ - for (rn = route_top(oi->nbrs); rn; rn = route_next(rn)) + for (rn = route_top(oi->nbrs); rn; rn = route_next(rn)) { if ((nbr = rn->info) != NULL) if (nbr != oi->nbr_self) OSPF_NSM_EVENT_EXECUTE(nbr, NSM_KillNbr); + } /* Cleanup Link State Acknowlegdment list. */ for (ALL_LIST_ELEMENTS(oi->ls_ack, node, nnode, lsa)) |
