From 393deb9bd663361e6b110d579a8b1d4c22667068 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen.hemminger@vyatta.com>
Date: Mon, 18 Aug 2008 14:13:29 -0700
Subject: [cleanup] Convert XMALLOC/memset to XCALLOC

Simple conversion of XMALLOC/memset to XCALLOC
---
 ripngd/ripng_peer.c | 6 +-----
 ripngd/ripngd.c     | 3 +--
 2 files changed, 2 insertions(+), 7 deletions(-)

(limited to 'ripngd')

diff --git a/ripngd/ripng_peer.c b/ripngd/ripng_peer.c
index 1e58bb87..c04456b8 100644
--- a/ripngd/ripng_peer.c
+++ b/ripngd/ripng_peer.c
@@ -42,11 +42,7 @@ struct list *peer_list;
 static struct ripng_peer *
 ripng_peer_new (void)
 {
-  struct ripng_peer *new;
-
-  new = XMALLOC (MTYPE_RIPNG_PEER, sizeof (struct ripng_peer));
-  memset (new, 0, sizeof (struct ripng_peer));
-  return new;
+  return XCALLOC (MTYPE_RIPNG_PEER, sizeof (struct ripng_peer));
 }
 
 static void
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index 5e9bfc54..7b00e037 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -1820,8 +1820,7 @@ ripng_create (void)
   assert (ripng == NULL);
 
   /* Allocaste RIPng instance. */
-  ripng = XMALLOC (MTYPE_RIPNG, sizeof (struct ripng));
-  memset (ripng, 0, sizeof (struct ripng));
+  ripng = XCALLOC (MTYPE_RIPNG, sizeof (struct ripng));
 
   /* Default version and timer values. */
   ripng->version = RIPNG_V1;
-- 
cgit v1.2.1