[cleanup] Convert XMALLOC/memset to XCALLOC
Simple conversion of XMALLOC/memset to XCALLOC
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c
index f453353..3c9c73a 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -304,12 +304,7 @@
struct lsa_header *
ospf_lsa_data_new (size_t size)
{
- struct lsa_header *new;
-
- new = (struct lsa_header *) XMALLOC (MTYPE_OSPF_LSA_DATA, size);
- memset (new, 0, size);
-
- return new;
+ return XCALLOC (MTYPE_OSPF_LSA_DATA, size);
}
/* Duplicate LSA data. */
@@ -3635,9 +3630,7 @@
{
struct lsa_action *data;
- data = XMALLOC (MTYPE_OSPF_MESSAGE, sizeof (struct lsa_action));
- memset (data, 0, sizeof (struct lsa_action));
-
+ data = XCALLOC (MTYPE_OSPF_MESSAGE, sizeof (struct lsa_action));
data->action = LSA_ACTION_FLOOD_AREA;
data->area = area;
data->lsa = ospf_lsa_lock (lsa); /* Message / Flood area */
@@ -3650,9 +3643,7 @@
{
struct lsa_action *data;
- data = XMALLOC (MTYPE_OSPF_MESSAGE, sizeof (struct lsa_action));
- memset (data, 0, sizeof (struct lsa_action));
-
+ data = XCALLOC (MTYPE_OSPF_MESSAGE, sizeof (struct lsa_action));
data->action = LSA_ACTION_FLUSH_AREA;
data->area = area;
data->lsa = ospf_lsa_lock (lsa); /* Message / Flush area */