Skip to content

Commit

Permalink
zebra: i declaration shadows other i declared
Browse files Browse the repository at this point in the history
Clear up some confustion

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
  • Loading branch information
donaldsharp committed Jan 26, 2023
1 parent 08c3dba commit 75c87b7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions zebra/zebra_nhg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1820,18 +1820,19 @@ static struct nexthop *nexthop_set_resolved(afi_t afi,

/* Copy labels of the resolved route and the parent resolving to it */
if (policy) {
int i = 0;
int label_num = 0;

/*
* Don't push the first SID if the corresponding action in the
* LFIB is POP.
*/
if (!newhop->nh_label || !newhop->nh_label->num_labels
|| newhop->nh_label->label[0] == MPLS_LABEL_IMPLICIT_NULL)
i = 1;
label_num = 1;

for (; i < policy->segment_list.label_num; i++)
labels[num_labels++] = policy->segment_list.labels[i];
for (; label_num < policy->segment_list.label_num; label_num++)
labels[num_labels++] =
policy->segment_list.labels[label_num];
label_type = policy->segment_list.type;
} else if (newhop->nh_label) {
for (i = 0; i < newhop->nh_label->num_labels; i++) {
Expand Down

0 comments on commit 75c87b7

Please sign in to comment.