summaryrefslogtreecommitdiff
path: root/bgpd/bgp_routemap.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-08-18 14:13:29 -0700
committerPaul Jakma <paul@quagga.net>2009-06-12 17:07:49 +0100
commit393deb9bd663361e6b110d579a8b1d4c22667068 (patch)
treee93ebf2f57bf92ff7a9cd045764b3cdbb99a07e5 /bgpd/bgp_routemap.c
parent3453a7122c1d585ad789ed0f63deb90cc5e89fae (diff)
[cleanup] Convert XMALLOC/memset to XCALLOC
Simple conversion of XMALLOC/memset to XCALLOC
Diffstat (limited to 'bgpd/bgp_routemap.c')
-rw-r--r--bgpd/bgp_routemap.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c
index d86937ba..4fff0268 100644
--- a/bgpd/bgp_routemap.c
+++ b/bgpd/bgp_routemap.c
@@ -956,8 +956,7 @@ route_set_ip_nexthop_compile (const char *arg)
}
}
- rins = XMALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (struct rmap_ip_nexthop_set));
- memset (rins, 0, sizeof (struct rmap_ip_nexthop_set));
+ rins = XCALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (struct rmap_ip_nexthop_set));
rins->address = address;
rins->peer_address = peer_address;
@@ -1426,9 +1425,7 @@ route_set_community_compile (const char *arg)
return NULL;
}
- rcs = XMALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (struct rmap_com_set));
- memset (rcs, 0, sizeof (struct rmap_com_set));
-
+ rcs = XCALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (struct rmap_com_set));
rcs->com = com;
rcs->additive = additive;
rcs->none = none;
@@ -1790,9 +1787,7 @@ route_set_aggregator_as_compile (const char *arg)
char as[10];
char address[20];
- aggregator = XMALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (struct aggregator));
- memset (aggregator, 0, sizeof (struct aggregator));
-
+ aggregator = XCALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (struct aggregator));
sscanf (arg, "%s %s", as, address);
aggregator->as = strtoul (as, NULL, 10);