diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-08-18 14:13:29 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-08-18 14:13:29 -0700 |
commit | aa990a9f58b5f46da95eb360049577a8833d649e (patch) | |
tree | faeff19a39b9c1df101fe381920e52178011e99a /bgpd/bgp_clist.c | |
parent | e5d63369e1f3fdc1c22ae15fe477de1f97022703 (diff) | |
download | quagga-aa990a9f58b5f46da95eb360049577a8833d649e.tar.bz2 quagga-aa990a9f58b5f46da95eb360049577a8833d649e.tar.xz |
Use XCALLOC
Replace calls to XMALLOC followed by memset with 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 a6ca1a46..6bf3b64a 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. */ |