aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-06-27 02:05:31 -0700
committerFlorin Coras <fcoras@cisco.com>2018-06-27 02:05:31 -0700
commit6e74aa2b9877623c6130d7b2a43b7d8fd0a1b9f8 (patch)
tree53d45a61e93039dc6e387d47603c556b2e889158 /src
parent6c9b9644450b5ee5672b1e0f66257b0e09fb0734 (diff)
acl: fix for loop initial declaration
Change-Id: Ie899ccbaae4df7cce4ebbba47ed6c3cce5269bdb Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/acl/hash_lookup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/acl/hash_lookup.c b/src/plugins/acl/hash_lookup.c
index ea07fad7e1b..9a9a1ff67ec 100644
--- a/src/plugins/acl/hash_lookup.c
+++ b/src/plugins/acl/hash_lookup.c
@@ -265,13 +265,14 @@ tm_assign_mask_type_index(acl_main_t *am, fa_5tuple_t *mask, int is_ip6, u32 lc_
u32 mask_type_index = ~0;
u32 for_mask_type_index = ~0;
ace_mask_type_entry_t *mte;
+ int order_index;
/* look for existing mask comparable with the one in input */
hash_applied_mask_info_t **hash_applied_mask_info_vec = vec_elt_at_index(am->hash_applied_mask_info_vec_by_lc_index, lc_index);
hash_applied_mask_info_t *minfo;
if (vec_len(*hash_applied_mask_info_vec) > 0) {
- for(int order_index = vec_len((*hash_applied_mask_info_vec)) -1; order_index >= 0; order_index--) {
+ for(order_index = vec_len((*hash_applied_mask_info_vec)) -1; order_index >= 0; order_index--) {
minfo = vec_elt_at_index((*hash_applied_mask_info_vec), order_index);
for_mask_type_index = minfo->mask_type_index;
mte = vec_elt_at_index(am->ace_mask_type_pool, for_mask_type_index);