summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_spf.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2021-03-22 19:24:59 +0100
committerDavid Lamparter <equinox@diac24.net>2021-03-22 19:26:02 +0100
commit771e1fbee0122be27510c9534584d7c2d7f1dcdd (patch)
tree9dc8659b5e7300a320aad95f6cd7695d20ea9264 /ospf6d/ospf6_spf.c
parentc7479286aef294af8fb13c7690e4ff93fc8f8a1e (diff)
ospf6d: split off ospf6_lsa_alloc()
... so we can make the MTYPEs static to ospf6_lsa.c Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'ospf6d/ospf6_spf.c')
-rw-r--r--ospf6d/ospf6_spf.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c
index d1931055a2..d71f7629c6 100644
--- a/ospf6d/ospf6_spf.c
+++ b/ospf6d/ospf6_spf.c
@@ -1021,13 +1021,8 @@ struct ospf6_lsa *ospf6_create_single_router_lsa(struct ospf6_area *area,
return NULL;
}
- /* Allocate memory for this LSA */
- new_header = XMALLOC(MTYPE_OSPF6_LSA_HEADER, total_lsa_length);
-
- /* LSA information structure */
- lsa = XCALLOC(MTYPE_OSPF6_LSA, sizeof(struct ospf6_lsa));
-
- lsa->header = (struct ospf6_lsa_header *)new_header;
+ lsa = ospf6_lsa_alloc(total_lsa_length);
+ new_header = (uint8_t *)lsa->header;
lsa->lsdb = area->temp_router_lsa_lsdb;