else
DR(oi).s_addr = 0;
- list_delete_and_null(&dr_list);
+ list_delete(&dr_list);
return dr;
}
else
BDR(oi).s_addr = 0;
- list_delete_and_null(&bdr_list);
- list_delete_and_null(&no_dr_list);
+ list_delete(&bdr_list);
+ list_delete(&no_dr_list);
return bdr;
}
zlog_debug("DR-Election[2nd]: DR %s", inet_ntoa(DR(oi)));
}
- list_delete_and_null(&el_list);
+ list_delete(&el_list);
/* if DR or BDR changes, cause AdjOK? neighbor event. */
if (!IPV4_ADDR_SAME(&old_dr, &DR(oi))
return 0;
}
-/* Hook function called after ospf ISM event is occured. And vty's
+/* Hook function called after ospf ISM event is occurred. And vty's
network command invoke this function after making interface
structure. */
static void ism_timer_set(struct ospf_interface *oi)
static int ism_loop_ind(struct ospf_interface *oi)
{
- int ret = 0;
-
/* call ism_interface_down. */
/* ret = ism_interface_down (oi); */
- return ret;
+ return 0;
}
/* Interface down event handler. */
}
/* Interface State Machine */
-struct {
+const struct {
int (*func)(struct ospf_interface *);
int next_state;
} ISM[OSPF_ISM_STATE_MAX][OSPF_ISM_EVENT_MAX] = {
},
};
-static const char *ospf_ism_event_str[] = {
+static const char *const ospf_ism_event_str[] = {
"NoEvent", "InterfaceUp", "WaitTimer", "BackupSeen",
"NeighborChange", "LoopInd", "UnLoopInd", "InterfaceDown",
};