mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 01:47:29 +00:00
Merge pull request #8700 from idryzhov/coverity
fix a couple of coverity warnings
This commit is contained in:
commit
e804e2597c
@ -599,6 +599,7 @@ static void nb_config_diff(const struct nb_config *config1,
|
|||||||
* the diff tree.
|
* the diff tree.
|
||||||
*/
|
*/
|
||||||
target = yang_dnode_get(config2->dnode, path);
|
target = yang_dnode_get(config2->dnode, path);
|
||||||
|
assert(target);
|
||||||
nb_config_diff_created(target, &seq, changes);
|
nb_config_diff_created(target, &seq, changes);
|
||||||
|
|
||||||
/* Skip rest of sub-tree, move to next sibling
|
/* Skip rest of sub-tree, move to next sibling
|
||||||
@ -607,6 +608,7 @@ static void nb_config_diff(const struct nb_config *config1,
|
|||||||
break;
|
break;
|
||||||
case 'd': /* delete */
|
case 'd': /* delete */
|
||||||
target = yang_dnode_get(config1->dnode, path);
|
target = yang_dnode_get(config1->dnode, path);
|
||||||
|
assert(target);
|
||||||
nb_config_diff_deleted(target, &seq, changes);
|
nb_config_diff_deleted(target, &seq, changes);
|
||||||
|
|
||||||
/* Skip rest of sub-tree, move to next sibling
|
/* Skip rest of sub-tree, move to next sibling
|
||||||
|
@ -721,7 +721,7 @@ pbr_nht_individual_nexthop_gw_update(struct pbr_nexthop_cache *pnhc,
|
|||||||
* So let's search and do the right thing on the
|
* So let's search and do the right thing on the
|
||||||
* interface event.
|
* interface event.
|
||||||
*/
|
*/
|
||||||
if (!pnhi->nhr && pnhi->ifp) {
|
if (!pnhi->nhr) {
|
||||||
switch (pnhc->nexthop.type) {
|
switch (pnhc->nexthop.type) {
|
||||||
case NEXTHOP_TYPE_BLACKHOLE:
|
case NEXTHOP_TYPE_BLACKHOLE:
|
||||||
case NEXTHOP_TYPE_IPV4:
|
case NEXTHOP_TYPE_IPV4:
|
||||||
@ -738,7 +738,6 @@ pbr_nht_individual_nexthop_gw_update(struct pbr_nexthop_cache *pnhc,
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pnhi->nhr) {
|
|
||||||
switch (pnhi->nhr->prefix.family) {
|
switch (pnhi->nhr->prefix.family) {
|
||||||
case AF_INET:
|
case AF_INET:
|
||||||
if (pnhc->nexthop.gate.ipv4.s_addr
|
if (pnhc->nexthop.gate.ipv4.s_addr
|
||||||
@ -752,7 +751,6 @@ pbr_nht_individual_nexthop_gw_update(struct pbr_nexthop_cache *pnhc,
|
|||||||
goto done; /* Unrelated change */
|
goto done; /* Unrelated change */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
pnhi->nhr_matched = true;
|
pnhi->nhr_matched = true;
|
||||||
if (!pnhi->nhr->nexthop_num) {
|
if (!pnhi->nhr->nexthop_num) {
|
||||||
|
Loading…
Reference in New Issue
Block a user