summaryrefslogtreecommitdiffstats
path: root/lib/linklist.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-08-18 23:13:29 +0200
committerPaul Jakma <paul@quagga.net>2009-06-12 18:07:49 +0200
commit393deb9bd663361e6b110d579a8b1d4c22667068 (patch)
treee93ebf2f57bf92ff7a9cd045764b3cdbb99a07e5 /lib/linklist.c
parent[bgpd] Add support for the old Linux 2.4, TCP_MD5_AUTH RFC2385 patch (diff)
downloadfrr-393deb9bd663361e6b110d579a8b1d4c22667068.tar.xz
frr-393deb9bd663361e6b110d579a8b1d4c22667068.zip
[cleanup] Convert XMALLOC/memset to XCALLOC
Simple conversion of XMALLOC/memset to XCALLOC
Diffstat (limited to 'lib/linklist.c')
-rw-r--r--lib/linklist.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/linklist.c b/lib/linklist.c
index a16e9e189..485a80bee 100644
--- a/lib/linklist.c
+++ b/lib/linklist.c
@@ -28,11 +28,7 @@
struct list *
list_new (void)
{
- struct list *new;
-
- new = XMALLOC (MTYPE_LINK_LIST, sizeof (struct list));
- memset (new, 0, sizeof (struct list));
- return new;
+ return XCALLOC (MTYPE_LINK_LIST, sizeof (struct list));
}
/* Free list. */
@@ -46,11 +42,7 @@ list_free (struct list *l)
static struct listnode *
listnode_new (void)
{
- struct listnode *node;
-
- node = XMALLOC (MTYPE_LINK_NODE, sizeof (struct listnode));
- memset (node, 0, sizeof (struct listnode));
- return node;
+ return XCALLOC (MTYPE_LINK_NODE, sizeof (struct listnode));
}
/* Free listnode. */