summaryrefslogtreecommitdiff
path: root/ospfd/ospf_api.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-08-18 14:13:29 -0700
committerPaul Jakma <paul@quagga.net>2009-06-12 17:07:49 +0100
commit393deb9bd663361e6b110d579a8b1d4c22667068 (patch)
treee93ebf2f57bf92ff7a9cd045764b3cdbb99a07e5 /ospfd/ospf_api.c
parent3453a7122c1d585ad789ed0f63deb90cc5e89fae (diff)
[cleanup] Convert XMALLOC/memset to XCALLOC
Simple conversion of XMALLOC/memset to XCALLOC
Diffstat (limited to 'ospfd/ospf_api.c')
-rw-r--r--ospfd/ospf_api.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/ospfd/ospf_api.c b/ospfd/ospf_api.c
index 9c9997ba..77383191 100644
--- a/ospfd/ospf_api.c
+++ b/ospfd/ospf_api.c
@@ -99,8 +99,7 @@ msg_new (u_char msgtype, void *msgbody, u_int32_t seqnum, u_int16_t msglen)
{
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 @@ msg_get_seq (struct msg *msg)
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. */