summaryrefslogtreecommitdiffstats
path: root/ospf6d
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 /ospf6d
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 'ospf6d')
-rw-r--r--ospf6d/ospf6_neighbor.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c
index 8a9c2626b..46dc621ae 100644
--- a/ospf6d/ospf6_neighbor.c
+++ b/ospf6d/ospf6_neighbor.c
@@ -86,9 +86,7 @@ struct ospf6_neighbor *ospf6_neighbor_create(uint32_t router_id,
struct ospf6_neighbor *on;
char buf[16];
- on = XMALLOC(MTYPE_OSPF6_NEIGHBOR, sizeof(struct ospf6_neighbor));
-
- memset(on, 0, sizeof(struct ospf6_neighbor));
+ on = XCALLOC(MTYPE_OSPF6_NEIGHBOR, sizeof(struct ospf6_neighbor));
inet_ntop(AF_INET, &router_id, buf, sizeof(buf));
snprintf(on->name, sizeof(on->name), "%s%%%s", buf,
oi->interface->name);