diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-08-18 14:13:29 -0700 |
---|---|---|
committer | Paul Jakma <paul@quagga.net> | 2009-06-12 17:07:49 +0100 |
commit | 393deb9bd663361e6b110d579a8b1d4c22667068 (patch) | |
tree | e93ebf2f57bf92ff7a9cd045764b3cdbb99a07e5 /ospfd/ospf_lsa.c | |
parent | 3453a7122c1d585ad789ed0f63deb90cc5e89fae (diff) |
[cleanup] Convert XMALLOC/memset to XCALLOC
Simple conversion of XMALLOC/memset to XCALLOC
Diffstat (limited to 'ospfd/ospf_lsa.c')
-rw-r--r-- | ospfd/ospf_lsa.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c index f453353d..3c9c73a3 100644 --- a/ospfd/ospf_lsa.c +++ b/ospfd/ospf_lsa.c @@ -304,12 +304,7 @@ ospf_lsa_discard (struct ospf_lsa *lsa) 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 @@ ospf_schedule_lsa_flood_area (struct ospf_area *area, struct ospf_lsa *lsa) { 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 @@ ospf_schedule_lsa_flush_area (struct ospf_area *area, struct ospf_lsa *lsa) { 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 */ |