summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_damp.c
diff options
context:
space:
mode:
authorF. Aragon <paco@voltanet.io>2018-09-14 14:53:55 +0200
committerF. Aragon <paco@voltanet.io>2018-09-14 15:01:03 +0200
commit3cf7af1d3dfad1e3250ce8fbf2f3ebd11db1cee9 (patch)
treee27d20972bae0e96a2e3c067d992adfa6aab3dd8 /bgpd/bgp_damp.c
parentMerge pull request #3007 from pacovn/static_analysis__shadow_variables2 (diff)
downloadfrr-3cf7af1d3dfad1e3250ce8fbf2f3ebd11db1cee9.tar.xz
frr-3cf7af1d3dfad1e3250ce8fbf2f3ebd11db1cee9.zip
bgpd: type fix
For tracking the last state of the penalty (struct bgp_damp_info) a 'double' type was used instead of using the 'unsigned int' being used in the structure. Detected using ./configure CFLAGS=-Wfloat-equal CC=clang Signed-off-by: F. Aragon <paco@voltanet.io>
Diffstat (limited to '')
-rw-r--r--bgpd/bgp_damp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bgpd/bgp_damp.c b/bgpd/bgp_damp.c
index 071ee6b9c..5ffab0bf4 100644
--- a/bgpd/bgp_damp.c
+++ b/bgpd/bgp_damp.c
@@ -177,7 +177,7 @@ int bgp_damp_withdraw(struct bgp_info *binfo, struct bgp_node *rn, afi_t afi,
{
time_t t_now;
struct bgp_damp_info *bdi = NULL;
- double last_penalty = 0;
+ unsigned int last_penalty = 0;
t_now = bgp_clock();