summaryrefslogtreecommitdiff
path: root/isisd/isis_dr.c
diff options
context:
space:
mode:
authorhasso <hasso>2005-09-28 18:45:54 +0000
committerhasso <hasso>2005-09-28 18:45:54 +0000
commit3fdb2dd9dd8b4ab3517896092dd1b677d191adf9 (patch)
tree2f2bdff0a3797517100d0f1319cd3e46bb00f53f /isisd/isis_dr.c
parentd3d7474ba98f01e6d9994ff48c0b3a4331a8ef2a (diff)
* *.c: Massive cleanup of lists loops. Stop abusing ALL_LIST_ELEMENTS.
Replace XMALLOC + memset with XCALLOC. Fix some indentation issues. The only really significant change is simplified isis_delete_adj function in isis_adjacency.c.
Diffstat (limited to 'isisd/isis_dr.c')
-rw-r--r--isisd/isis_dr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/isisd/isis_dr.c b/isisd/isis_dr.c
index 335946c8..8d306c8f 100644
--- a/isisd/isis_dr.c
+++ b/isisd/isis_dr.c
@@ -130,7 +130,7 @@ int
isis_dr_elect (struct isis_circuit *circuit, int level)
{
struct list *adjdb;
- struct listnode *node, *nnode;
+ struct listnode *node;
struct isis_adjacency *adj, *adj_dr = NULL;
struct list *list = list_new ();
u_char own_prio;
@@ -152,7 +152,7 @@ isis_dr_elect (struct isis_circuit *circuit, int level)
/*
* Loop the adjacencies and find the one with the biggest priority
*/
- for (ALL_LIST_ELEMENTS (list, node, nnode, adj))
+ for (ALL_LIST_ELEMENTS_RO (list, node, adj))
{
/* clear flag for show output */
adj->dis_record[level - 1].dis = ISIS_IS_NOT_DIS;
@@ -214,7 +214,7 @@ isis_dr_elect (struct isis_circuit *circuit, int level)
*/
/* rotate the history log */
- for (ALL_LIST_ELEMENTS (list, node, nnode, adj))
+ for (ALL_LIST_ELEMENTS_RO (list, node, adj))
isis_check_dr_change (adj, level);
/* commence */
@@ -234,7 +234,7 @@ isis_dr_elect (struct isis_circuit *circuit, int level)
* if yes rotate the history log
*/
- for (ALL_LIST_ELEMENTS (list, node, nnode, adj))
+ for (ALL_LIST_ELEMENTS_RO (list, node, adj))
isis_check_dr_change (adj, level);
/*