[cleanup] Convert XMALLOC/memset to XCALLOC
Simple conversion of XMALLOC/memset to XCALLOC
diff --git a/ospfd/ospf_api.c b/ospfd/ospf_api.c
index 9c9997b..7738319 100644
--- a/ospfd/ospf_api.c
+++ b/ospfd/ospf_api.c
@@ -99,8 +99,7 @@
{
struct msg *new;
- new = XMALLOC (MTYPE_OSPF_API_MSG, sizeof (struct msg));
- memset (new, 0, sizeof (struct msg));
+ new = XCALLOC (MTYPE_OSPF_API_MSG, sizeof (struct msg));
new->hdr.version = OSPF_API_VERSION;
new->hdr.msgtype = msgtype;
@@ -271,12 +270,7 @@
struct msg_fifo *
msg_fifo_new ()
{
- struct msg_fifo *new;
-
- new = XMALLOC (MTYPE_OSPF_API_FIFO, sizeof (struct msg_fifo));
- memset (new, 0, sizeof (struct msg_fifo));
-
- return new;
+ return XCALLOC (MTYPE_OSPF_API_FIFO, sizeof (struct msg_fifo));
}
/* Add new message to fifo. */