]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospfd/ospf_spf.c
zebra, lib: fix the ZEBRA_INTERFACE_VRF_UPDATE zapi message
[mirror_frr.git] / ospfd / ospf_spf.c
index c6c16e71693ae1e5fab96d7d274a08b6e5da92b9..9c223facd354b4326175c11d5ece75814c4eab7e 100644 (file)
@@ -47,6 +47,7 @@
 #include "ospfd/ospf_abr.h"
 #include "ospfd/ospf_dump.h"
 #include "ospfd/ospf_sr.h"
+#include "ospfd/ospf_errors.h"
 
 /* Variables to ensure a SPF scheduled log message is printed only once */
 
@@ -154,9 +155,6 @@ static struct vertex_parent *vertex_parent_new(struct vertex *v, int backlink,
 
        new = XMALLOC(MTYPE_OSPF_VERTEX_PARENT, sizeof(struct vertex_parent));
 
-       if (new == NULL)
-               return NULL;
-
        new->parent = v;
        new->backlink = backlink;
        new->nexthop = hop;
@@ -211,10 +209,10 @@ static void ospf_vertex_free(void *data)
        // assert (listcount (v->parents) == 0);
 
        if (v->children)
-               list_delete_and_null(&v->children);
+               list_delete(&v->children);
 
        if (v->parents)
-               list_delete_and_null(&v->parents);
+               list_delete(&v->parents);
 
        v->lsa = NULL;
 
@@ -862,7 +860,8 @@ static void ospf_spf_next(struct vertex *v, struct ospf *ospf,
                                                zlog_debug("found the LSA");
                                break;
                        default:
-                               zlog_warn("Invalid LSA link type %d", type);
+                               flog_warn(EC_OSPF_LSA,
+                                         "Invalid LSA link type %d", type);
                                continue;
                        }
                } else {
@@ -1087,7 +1086,7 @@ void ospf_rtrs_free(struct route_table *rtrs)
                        for (ALL_LIST_ELEMENTS(or_list, node, nnode, or))
                                ospf_route_free(or);
 
-                       list_delete_and_null(&or_list);
+                       list_delete(&or_list);
 
                        /* Unlock the node. */
                        rn->info = NULL;