diff options
Diffstat (limited to 'bgpd/bgp_damp.c')
| -rw-r--r-- | bgpd/bgp_damp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bgpd/bgp_damp.c b/bgpd/bgp_damp.c index 97d625493f..565d0b8e19 100644 --- a/bgpd/bgp_damp.c +++ b/bgpd/bgp_damp.c @@ -50,6 +50,12 @@ static int bgp_reuse_index(int penalty, struct bgp_damp_config *bdc) unsigned int i; int index; + /* + * reuse_limit can't be zero, this is for Coverity + * to bypass division by zero test. + */ + assert(bdc->reuse_limit); + i = (int)(((double)penalty / bdc->reuse_limit - 1.0) * bdc->scale_factor); |
