]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospf6d/ospf6_lsa.c
[cleanup] Convert XMALLOC/memset to XCALLOC
[mirror_frr.git] / ospf6d / ospf6_lsa.c
index 87df7418a02cbb21d9ade864ed2edfaaa349d00f..e8290b6369da813bc6ccff3751bd8a1b7cbf29c0 100644 (file)
@@ -468,8 +468,7 @@ ospf6_lsa_create (struct ospf6_lsa_header *header)
   /* LSA information structure */
   /* allocate memory */
   lsa = (struct ospf6_lsa *)
-    XMALLOC (MTYPE_OSPF6_LSA, sizeof (struct ospf6_lsa));
-  memset (lsa, 0, sizeof (struct ospf6_lsa));
+    XCALLOC (MTYPE_OSPF6_LSA, sizeof (struct ospf6_lsa));
 
   lsa->header = (struct ospf6_lsa_header *) new_header;
 
@@ -498,8 +497,7 @@ ospf6_lsa_create_headeronly (struct ospf6_lsa_header *header)
   /* LSA information structure */
   /* allocate memory */
   lsa = (struct ospf6_lsa *)
-    XMALLOC (MTYPE_OSPF6_LSA, sizeof (struct ospf6_lsa));
-  memset (lsa, 0, sizeof (struct ospf6_lsa));
+    XCALLOC (MTYPE_OSPF6_LSA, sizeof (struct ospf6_lsa));
 
   lsa->header = (struct ospf6_lsa_header *) new_header;
   SET_FLAG (lsa->flag, OSPF6_LSA_HEADERONLY);