summaryrefslogtreecommitdiffstats
path: root/ripd/ripd.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-12-18 17:19:46 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-12-18 17:19:46 -0800
commit3111ae93268b1af36e469b1f7744e821f27f0a30 (patch)
tree0c6282fe70d9f0df38ec5136a046ce14311c0d42 /ripd/ripd.c
parent0b49f5d475aa5503e60d8dbdc9b4dcc8f6a614ec (diff)
parent177fec0b82d18dc92fe40b51bf1a4a294fb9a7ff (diff)
downloadquagga-3111ae93268b1af36e469b1f7744e821f27f0a30.tar.bz2
quagga-3111ae93268b1af36e469b1f7744e821f27f0a30.tar.xz
Merge branch 'jenner' of suva.vyatta.com:/git/vyatta-quagga into jenner
Diffstat (limited to 'ripd/ripd.c')
-rw-r--r--ripd/ripd.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/ripd/ripd.c b/ripd/ripd.c
index fc8ce1b8..2525679c 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -112,7 +112,11 @@ rip_route_rte (struct rip_info *rinfo)
static struct rip_info *
rip_info_new ()
{
- return XCALLOC (MTYPE_RIP_INFO, sizeof (struct rip_info));
+ struct rip_info *new;
+
+ new = XMALLOC (MTYPE_RIP_INFO, sizeof (struct rip_info));
+ memset (new, 0, sizeof (struct rip_info));
+ return new;
}
void
@@ -2693,7 +2697,8 @@ rip_redistribute_withdraw (int type)
static int
rip_create (void)
{
- rip = XCALLOC (MTYPE_RIP, sizeof (struct rip));
+ rip = XMALLOC (MTYPE_RIP, sizeof (struct rip));
+ memset (rip, 0, sizeof (struct rip));
/* Set initial value. */
rip->version_send = RI_RIP_VERSION_2;
@@ -2973,7 +2978,6 @@ DEFUN (no_rip_route,
return CMD_SUCCESS;
}
-#if 0
static void
rip_update_default_metric (void)
{
@@ -2985,7 +2989,6 @@ rip_update_default_metric (void)
if (rinfo->type != ZEBRA_ROUTE_RIP && rinfo->type != ZEBRA_ROUTE_CONNECT)
rinfo->metric = rip->default_metric;
}
-#endif
DEFUN (rip_default_metric,
rip_default_metric_cmd,
@@ -3114,7 +3117,10 @@ struct rip_distance
static struct rip_distance *
rip_distance_new (void)
{
- return XCALLOC (MTYPE_RIP_DISTANCE, sizeof (struct rip_distance));
+ struct rip_distance *new;
+ new = XMALLOC (MTYPE_RIP_DISTANCE, sizeof (struct rip_distance));
+ memset (new, 0, sizeof (struct rip_distance));
+ return new;
}
static void
@@ -3682,7 +3688,7 @@ config_write_rip (struct vty *vty)
}
/* RIP node structure. */
-static struct cmd_node rip_node =
+struct cmd_node rip_node =
{
RIP_NODE,
"%s(config-router)# ",