Nest: Several assumptions to tame the static analyzer
This commit is contained in:
parent
bbe49ae569
commit
0fa8bf91cd
1 changed files with 5 additions and 1 deletions
|
@ -278,18 +278,22 @@ nexthop_merge(struct nexthop *x, struct nexthop *y, int rx, int ry, int max, lin
|
|||
while ((x || y) && max--)
|
||||
{
|
||||
int cmp = nexthop_compare_node(x, y);
|
||||
|
||||
if (cmp < 0)
|
||||
{
|
||||
ASSUME(x);
|
||||
*n = rx ? x : nexthop_copy_node(x, lp);
|
||||
x = x->next;
|
||||
}
|
||||
else if (cmp > 0)
|
||||
{
|
||||
ASSUME(y);
|
||||
*n = ry ? y : nexthop_copy_node(y, lp);
|
||||
y = y->next;
|
||||
}
|
||||
else
|
||||
{
|
||||
ASSUME(x && y);
|
||||
*n = rx ? x : (ry ? y : nexthop_copy_node(x, lp));
|
||||
x = x->next;
|
||||
y = y->next;
|
||||
|
|
Loading…
Reference in a new issue