summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_damp.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-08-17 18:51:47 +0200
committerPaul Jakma <paul@quagga.net>2008-08-22 20:56:26 +0200
commitf3019aff2421d9c3d16498f22cd245e3f8948d4c (patch)
treee5630448e6bf0697cbdb35e42054ef84763bda21 /bgpd/bgp_damp.c
parent[zebra] trivia: static qualifiers for metaq (diff)
downloadfrr-f3019aff2421d9c3d16498f22cd245e3f8948d4c.tar.xz
frr-f3019aff2421d9c3d16498f22cd245e3f8948d4c.zip
[bgpd] remove useless check and return in bgp_config_write_damp
2008-08-17 Stephen Hemminger <stephen.hemminger@vyatta.com> * bgp_damp.?: (bgp_config_write_damp) remove useless check of statically allocated config storage, and useless return value Signed-off-by: Paul Jakma <paul@quagga.net>
Diffstat (limited to 'bgpd/bgp_damp.c')
-rw-r--r--bgpd/bgp_damp.c45
1 files changed, 20 insertions, 25 deletions
diff --git a/bgpd/bgp_damp.c b/bgpd/bgp_damp.c
index 5a7c9aaaa..ba25f4d1a 100644
--- a/bgpd/bgp_damp.c
+++ b/bgpd/bgp_damp.c
@@ -517,33 +517,28 @@ bgp_damp_disable (struct bgp *bgp, afi_t afi, safi_t safi)
return 0;
}
-int
+void
bgp_config_write_damp (struct vty *vty)
{
- if (&bgp_damp_cfg)
- {
- if (bgp_damp_cfg.half_life == DEFAULT_HALF_LIFE*60
- && bgp_damp_cfg.reuse_limit == DEFAULT_REUSE
- && bgp_damp_cfg.suppress_value == DEFAULT_SUPPRESS
- && bgp_damp_cfg.max_suppress_time == bgp_damp_cfg.half_life*4)
- vty_out (vty, " bgp dampening%s", VTY_NEWLINE);
- else if (bgp_damp_cfg.half_life != DEFAULT_HALF_LIFE*60
- && bgp_damp_cfg.reuse_limit == DEFAULT_REUSE
- && bgp_damp_cfg.suppress_value == DEFAULT_SUPPRESS
- && bgp_damp_cfg.max_suppress_time == bgp_damp_cfg.half_life*4)
- vty_out (vty, " bgp dampening %ld%s",
- bgp_damp_cfg.half_life/60,
- VTY_NEWLINE);
- else
- vty_out (vty, " bgp dampening %ld %d %d %ld%s",
- bgp_damp_cfg.half_life/60,
- bgp_damp_cfg.reuse_limit,
- bgp_damp_cfg.suppress_value,
- bgp_damp_cfg.max_suppress_time/60,
- VTY_NEWLINE);
- return 1;
- }
- return 0;
+ if (bgp_damp_cfg.half_life == DEFAULT_HALF_LIFE*60
+ && bgp_damp_cfg.reuse_limit == DEFAULT_REUSE
+ && bgp_damp_cfg.suppress_value == DEFAULT_SUPPRESS
+ && bgp_damp_cfg.max_suppress_time == bgp_damp_cfg.half_life*4)
+ vty_out (vty, " bgp dampening%s", VTY_NEWLINE);
+ else if (bgp_damp_cfg.half_life != DEFAULT_HALF_LIFE*60
+ && bgp_damp_cfg.reuse_limit == DEFAULT_REUSE
+ && bgp_damp_cfg.suppress_value == DEFAULT_SUPPRESS
+ && bgp_damp_cfg.max_suppress_time == bgp_damp_cfg.half_life*4)
+ vty_out (vty, " bgp dampening %ld%s",
+ bgp_damp_cfg.half_life/60,
+ VTY_NEWLINE);
+ else
+ vty_out (vty, " bgp dampening %ld %d %d %ld%s",
+ bgp_damp_cfg.half_life/60,
+ bgp_damp_cfg.reuse_limit,
+ bgp_damp_cfg.suppress_value,
+ bgp_damp_cfg.max_suppress_time/60,
+ VTY_NEWLINE);
}
#define BGP_UPTIME_LEN 25