summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_te.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-08-18 14:13:29 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-08-18 14:13:29 -0700
commitaa990a9f58b5f46da95eb360049577a8833d649e (patch)
treefaeff19a39b9c1df101fe381920e52178011e99a /ospfd/ospf_te.c
parente5d63369e1f3fdc1c22ae15fe477de1f97022703 (diff)
downloadquagga-aa990a9f58b5f46da95eb360049577a8833d649e.tar.bz2
quagga-aa990a9f58b5f46da95eb360049577a8833d649e.tar.xz
Use XCALLOC
Replace calls to XMALLOC followed by memset with XCALLOC.
Diffstat (limited to 'ospfd/ospf_te.c')
-rw-r--r--ospfd/ospf_te.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ospfd/ospf_te.c b/ospfd/ospf_te.c
index a3ebe62e..c5ec0ad8 100644
--- a/ospfd/ospf_te.c
+++ b/ospfd/ospf_te.c
@@ -561,13 +561,13 @@ ospf_mpls_te_new_if (struct interface *ifp)
goto out;
}
- if ((new = XMALLOC (MTYPE_OSPF_MPLS_TE_LINKPARAMS,
- sizeof (struct mpls_te_link))) == NULL)
+ new = XCALLOC (MTYPE_OSPF_MPLS_TE_LINKPARAMS,
+ sizeof (struct mpls_te_link));
+ if (new == NULL)
{
zlog_warn ("ospf_mpls_te_new_if: XMALLOC: %s", safe_strerror (errno));
goto out;
}
- memset (new, 0, sizeof (struct mpls_te_link));
new->area = NULL;
new->flags = 0;