diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2020-08-21 02:44:27 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2020-08-27 01:16:19 +0200 |
commit | 36944791620d1b223dede262948a0afe3dadca1f (patch) | |
tree | 3ecc59dc5cc3202f27c3b6fd9f10555a64e93da6 /isisd/isis_sr.c | |
parent | isisd: reuse adjacency state change hook in the SPF code (diff) | |
download | frr-36944791620d1b223dede262948a0afe3dadca1f.tar.xz frr-36944791620d1b223dede262948a0afe3dadca1f.zip |
isisd: minor cleanup
* Bring back some consts that were removed;
* Replace ALL_LIST_ELEMENTS by ALL_LIST_ELEMENTS_RO whenever
possible;
* Fix some CLI return values;
* Remove some unnecessary initializations.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'isisd/isis_sr.c')
-rw-r--r-- | isisd/isis_sr.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/isisd/isis_sr.c b/isisd/isis_sr.c index 5f6335c7d..d05afaa63 100644 --- a/isisd/isis_sr.c +++ b/isisd/isis_sr.c @@ -210,7 +210,7 @@ int isis_sr_cfg_srlb_update(struct isis_area *area, uint32_t lower_bound, uint32_t upper_bound) { struct isis_sr_db *srdb = &area->srdb; - struct listnode *node, *nnode; + struct listnode *node; struct sr_adjacency *sra; sr_debug("ISIS-Sr (%s): Update SRLB with new range [%u/%u]", @@ -236,7 +236,7 @@ int isis_sr_cfg_srlb_update(struct isis_area *area, uint32_t lower_bound, return -1; /* Reinstall local Adjacency-SIDs with new labels. */ - for (ALL_LIST_ELEMENTS(area->srdb.adj_sids, node, nnode, sra)) + for (ALL_LIST_ELEMENTS_RO(area->srdb.adj_sids, node, sra)) sr_adj_sid_update(sra, &srdb->srlb); /* Update and Flood LSP */ @@ -1986,7 +1986,7 @@ DEFUN(show_sr_prefix_sids, show_sr_prefix_sids_cmd, "Segment-Routing\n" "Segment-Routing Prefix-SIDs\n") { - struct listnode *node, *inode, *nnode; + struct listnode *node, *inode; struct isis_area *area; struct isis *isis = NULL; const char *vrf_name = VRF_DEFAULT_NAME; @@ -1996,7 +1996,7 @@ DEFUN(show_sr_prefix_sids, show_sr_prefix_sids_cmd, ISIS_FIND_VRF_ARGS(argv, argc, idx_vrf, vrf_name, all_vrf); if (vrf_name) { if (all_vrf) { - for (ALL_LIST_ELEMENTS(im->isis, nnode, inode, isis)) { + for (ALL_LIST_ELEMENTS_RO(im->isis, inode, isis)) { for (ALL_LIST_ELEMENTS_RO(isis->area_list, node, area)) { vty_out(vty, "Area %s:\n", @@ -2084,11 +2084,11 @@ DEFUN(show_sr_node, show_sr_node_cmd, "Segment-Routing\n" "Segment-Routing node\n") { - struct listnode *node, *inode, *nnode; + struct listnode *node, *inode; struct isis_area *area; - struct isis *isis = NULL; + struct isis *isis; - for (ALL_LIST_ELEMENTS(im->isis, inode, nnode, isis)) { + for (ALL_LIST_ELEMENTS_RO(im->isis, inode, isis)) { for (ALL_LIST_ELEMENTS_RO(isis->area_list, node, area)) { vty_out(vty, "Area %s:\n", area->area_tag ? area->area_tag : "null"); |