summaryrefslogtreecommitdiffstats
path: root/babeld/babel_interface.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2019-02-25 21:41:01 +0100
committerQuentin Young <qlyoung@cumulusnetworks.com>2019-02-26 00:00:46 +0100
commitaa406bbcc8d577e86dec79afc317d71d32453c19 (patch)
tree656736f85b3eb553282c0ecbdb5e4b88a1995823 /babeld/babel_interface.c
parent*: remove casts of XMALLOC / XCALLOC (diff)
downloadfrr-aa406bbcc8d577e86dec79afc317d71d32453c19.tar.xz
frr-aa406bbcc8d577e86dec79afc317d71d32453c19.zip
*: replace XMALLOC + memset with XCALLOC
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'babeld/babel_interface.c')
-rw-r--r--babeld/babel_interface.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c
index 973c4618f..0ff89abc4 100644
--- a/babeld/babel_interface.c
+++ b/babeld/babel_interface.c
@@ -1414,10 +1414,7 @@ static babel_interface_nfo *
babel_interface_allocate (void)
{
babel_interface_nfo *babel_ifp;
- babel_ifp = XMALLOC(MTYPE_BABEL_IF, sizeof(babel_interface_nfo));
-
- /* Here are set the default values for an interface. */
- memset(babel_ifp, 0, sizeof(babel_interface_nfo));
+ babel_ifp = XCALLOC(MTYPE_BABEL_IF, sizeof(babel_interface_nfo));
/* All flags are unset */
babel_ifp->bucket_time = babel_now.tv_sec;
babel_ifp->bucket = BUCKET_TOKENS_MAX;