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_route.c | |
parent | 3453a7122c1d585ad789ed0f63deb90cc5e89fae (diff) | |
download | quagga-393deb9bd663361e6b110d579a8b1d4c22667068.tar.bz2 quagga-393deb9bd663361e6b110d579a8b1d4c22667068.tar.xz |
[cleanup] Convert XMALLOC/memset to XCALLOC
Simple conversion of XMALLOC/memset to XCALLOC
Diffstat (limited to 'bgpd/bgp_route.c')
-rw-r--r-- | bgpd/bgp_route.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/bgpd/bgp_route.c b/bgpd/bgp_route.c index 6b7828ca..5177dc07 100644 --- a/bgpd/bgp_route.c +++ b/bgpd/bgp_route.c @@ -129,12 +129,7 @@ bgp_info_extra_get (struct bgp_info *ri) static struct bgp_info * bgp_info_new () { - struct bgp_info *new; - - new = XMALLOC (MTYPE_BGP_ROUTE, sizeof (struct bgp_info)); - memset (new, 0, sizeof (struct bgp_info)); - - return new; + return XCALLOC (MTYPE_BGP_ROUTE, sizeof (struct bgp_info)); } /* Free bgp route information. */ @@ -3121,10 +3116,7 @@ bgp_nlri_sanity_check (struct peer *peer, int afi, u_char *pnt, static struct bgp_static * bgp_static_new () { - struct bgp_static *new; - new = XMALLOC (MTYPE_BGP_STATIC, sizeof (struct bgp_static)); - memset (new, 0, sizeof (struct bgp_static)); - return new; + return XCALLOC (MTYPE_BGP_STATIC, sizeof (struct bgp_static)); } static void @@ -4509,10 +4501,7 @@ struct bgp_aggregate static struct bgp_aggregate * bgp_aggregate_new () { - struct bgp_aggregate *new; - new = XMALLOC (MTYPE_BGP_AGGREGATE, sizeof (struct bgp_aggregate)); - memset (new, 0, sizeof (struct bgp_aggregate)); - return new; + return XCALLOC (MTYPE_BGP_AGGREGATE, sizeof (struct bgp_aggregate)); } static void @@ -10859,10 +10848,7 @@ struct bgp_distance static struct bgp_distance * bgp_distance_new () { - struct bgp_distance *new; - new = XMALLOC (MTYPE_BGP_DISTANCE, sizeof (struct bgp_distance)); - memset (new, 0, sizeof (struct bgp_distance)); - return new; + return XCALLOC (MTYPE_BGP_DISTANCE, sizeof (struct bgp_distance)); } static void |