]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: type fix 3030/head
authorF. Aragon <paco@voltanet.io>
Fri, 14 Sep 2018 12:53:55 +0000 (14:53 +0200)
committerF. Aragon <paco@voltanet.io>
Fri, 14 Sep 2018 13:01:03 +0000 (15:01 +0200)
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>
bgpd/bgp_damp.c

index 071ee6b9c67632af697d4115f6a1189b54c2f798..5ffab0bf4f50954651ebf28484c9544cbc0ce47d 100644 (file)
@@ -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();