diff options
| author | Donald Sharp <donaldsharp72@gmail.com> | 2023-11-02 19:26:05 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-02 19:26:05 -0400 |
| commit | ad44b541ef84adfdfb97460ea0de50371328675b (patch) | |
| tree | 20c4d58d7a839b695615b663544f0c0cd9bf5d1f | |
| parent | c772c52e625e37af929d65e5e105c6508c9ea6a7 (diff) | |
| parent | 42045aac7b44d74229ba8f3e492acb404cc93320 (diff) | |
Merge pull request #14717 from opensourcerouting/fix/coverity_issues
A couple coverity issues
| -rw-r--r-- | bgpd/bgp_labelpool.c | 6 | ||||
| -rw-r--r-- | zebra/redistribute.c | 4 |
2 files changed, 1 insertions, 9 deletions
diff --git a/bgpd/bgp_labelpool.c b/bgpd/bgp_labelpool.c index b2bb49b943..bf2b3566b4 100644 --- a/bgpd/bgp_labelpool.c +++ b/bgpd/bgp_labelpool.c @@ -652,11 +652,7 @@ void bgp_lp_event_zebra_up(void) } /* round up */ - if (((float)labels_needed / (float)lp->next_chunksize) > - (labels_needed / lp->next_chunksize)) - chunks_needed = (labels_needed / lp->next_chunksize) + 1; - else - chunks_needed = (labels_needed / lp->next_chunksize); + chunks_needed = (labels_needed + lp->next_chunksize - 1) / lp->next_chunksize; labels_needed = chunks_needed * lp->next_chunksize; /* diff --git a/zebra/redistribute.c b/zebra/redistribute.c index 71e7956324..6121949ced 100644 --- a/zebra/redistribute.c +++ b/zebra/redistribute.c @@ -135,10 +135,6 @@ static void zebra_redistribute(struct zserv *client, int type, if (!zebra_check_addr(&rn->p)) continue; - if (type == ZEBRA_ROUTE_ADD && is_table_direct && - newre->vrf_id != VRF_DEFAULT) - continue; - zsend_redistribute_route(ZEBRA_REDISTRIBUTE_ROUTE_ADD, client, rn, newre, is_table_direct); } |
