summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2023-01-26 10:41:55 -0500
committerDonald Sharp <sharpd@nvidia.com>2023-01-26 11:40:33 -0500
commit75c87b727905b2399fa2c39e2a723483154a225c (patch)
tree91eea25d61433de5744b8bb159ce5bf5e1c5ce13
parent08c3dba71902b62f32f526527adf0d28569bdb02 (diff)
zebra: i declaration shadows other i declared
Clear up some confustion Signed-off-by: Donald Sharp <sharpd@nvidia.com>
-rw-r--r--zebra/zebra_nhg.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c
index 286cc0292d..758fed7280 100644
--- a/zebra/zebra_nhg.c
+++ b/zebra/zebra_nhg.c
@@ -1820,7 +1820,7 @@ 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
@@ -1828,10 +1828,11 @@ static struct nexthop *nexthop_set_resolved(afi_t afi,
*/
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++) {