]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: fix time truncation due to parameter type
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Fri, 20 Jan 2023 19:20:56 +0000 (16:20 -0300)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Fri, 20 Jan 2023 19:20:56 +0000 (16:20 -0300)
Use the correct function parameters type to avoid truncation and other
signal issues.

Found by Coverity Scan (CID 1519802)

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
bgpd/bgp_damp.c

index 664619078aff1866a3ec38423119b05773729ea0..56bbaf419478412e8f68ed74b0eb9bc1db4af228 100644 (file)
@@ -327,7 +327,8 @@ void bgp_damp_info_free(struct bgp_damp_info *bdi, int withdraw, afi_t afi,
        XFREE(MTYPE_BGP_DAMP_INFO, bdi);
 }
 
-static void bgp_damp_parameter_set(int hlife, int reuse, int sup, int maxsup,
+static void bgp_damp_parameter_set(time_t hlife, unsigned int reuse,
+                                  unsigned int sup, time_t maxsup,
                                   struct bgp_damp_config *bdc)
 {
        double reuse_max_ratio;