diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-08-18 14:13:29 -0700 |
---|---|---|
committer | Paul Jakma <paul@quagga.net> | 2009-06-12 17:07:49 +0100 |
commit | 393deb9bd663361e6b110d579a8b1d4c22667068 (patch) | |
tree | e93ebf2f57bf92ff7a9cd045764b3cdbb99a07e5 /bgpd/bgp_clist.c | |
parent | 3453a7122c1d585ad789ed0f63deb90cc5e89fae (diff) |
[cleanup] Convert XMALLOC/memset to XCALLOC
Simple conversion of XMALLOC/memset to XCALLOC
Diffstat (limited to 'bgpd/bgp_clist.c')
-rw-r--r-- | bgpd/bgp_clist.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/bgpd/bgp_clist.c b/bgpd/bgp_clist.c index f75fc55b..a8d8742f 100644 --- a/bgpd/bgp_clist.c +++ b/bgpd/bgp_clist.c @@ -51,11 +51,7 @@ community_list_master_lookup (struct community_list_handler *ch, int master) static struct community_entry * community_entry_new () { - struct community_entry *new; - - new = XMALLOC (MTYPE_COMMUNITY_LIST_ENTRY, sizeof (struct community_entry)); - memset (new, 0, sizeof (struct community_entry)); - return new; + return XCALLOC (MTYPE_COMMUNITY_LIST_ENTRY, sizeof (struct community_entry)); } /* Free community list entry. */ @@ -92,11 +88,7 @@ community_entry_free (struct community_entry *entry) static struct community_list * community_list_new () { - struct community_list *new; - - new = XMALLOC (MTYPE_COMMUNITY_LIST, sizeof (struct community_list)); - memset (new, 0, sizeof (struct community_list)); - return new; + return XCALLOC (MTYPE_COMMUNITY_LIST, sizeof (struct community_list)); } /* Free community-list. */ |