From 40151a459324e83f7cdcd35746d448c6db976860 Mon Sep 17 00:00:00 2001 From: Igor Putovny Date: Tue, 29 Apr 2025 14:44:37 +0200 Subject: [PATCH] Revert "Replace uint with u32" This reverts commit e0f228bd98fde24458779e48658c999df92813f2. --- proto/aggregator/aggregator.c | 10 +++++----- proto/aggregator/aggregator.h | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/proto/aggregator/aggregator.c b/proto/aggregator/aggregator.c index e8759b9ea..55fc32744 100644 --- a/proto/aggregator/aggregator.c +++ b/proto/aggregator/aggregator.c @@ -217,7 +217,7 @@ aggregator_rta_set_static_attr(struct rta *rta, const struct rta *old, struct f_ static int aggregator_same_val_list(const struct f_val *v1, const struct f_val *v2, uint len) { - for (u32 i = 0; i < len; i++) + for (uint i = 0; i < len; i++) if (!val_same(&v1[i], &v2[i])) return 0; @@ -250,7 +250,7 @@ aggregator_bucket_update(struct aggregator_proto *p, struct aggregator_bucket *b rta->eattrs = eal; /* Seed the attributes from aggregator rule */ - for (u32 i = 0; i < p->aggr_on_count; i++) + for (uint i = 0; i < p->aggr_on_count; i++) { if (p->aggr_on[i].type == AGGR_ITEM_DYNAMIC_ATTR) { @@ -545,7 +545,7 @@ aggregator_rt_notify(struct proto *P, struct channel *src_ch, net *net, rte *new struct aggregator_bucket *tmp_bucket = allocz(sizeof(*tmp_bucket) + sizeof(tmp_bucket->aggr_data[0]) * p->aggr_on_count); ASSERT_DIE(tmp_bucket->id == 0); - for (u32 val_idx = 0; val_idx < p->aggr_on_count; val_idx++) + for (uint val_idx = 0; val_idx < p->aggr_on_count; val_idx++) { int type = p->aggr_on[val_idx].type; struct f_val *pos = &tmp_bucket->aggr_data[val_idx]; @@ -606,7 +606,7 @@ aggregator_rt_notify(struct proto *P, struct channel *src_ch, net *net, rte *new u64 haux = 0; mem_hash_init(&haux); - for (u32 i = 0; i < p->aggr_on_count; i++) + for (uint i = 0; i < p->aggr_on_count; i++) { mem_hash_mix_num(&haux, tmp_bucket->aggr_data[i].type); @@ -1013,7 +1013,7 @@ aggregator_reconfigure(struct proto *P, struct proto_config *CF) return 0; /* Compare aggregator rule */ - for (u32 i = 0; i < p->aggr_on_count; i++) + for (uint i = 0; i < p->aggr_on_count; i++) { switch (cf->aggr_on[i].type) { diff --git a/proto/aggregator/aggregator.h b/proto/aggregator/aggregator.h index 22fe611bf..bce497f74 100644 --- a/proto/aggregator/aggregator.h +++ b/proto/aggregator/aggregator.h @@ -29,8 +29,8 @@ struct aggregator_config { struct proto_config c; struct channel_config *src, *dst; struct aggr_item *aggr_on; - u32 aggr_on_count; - u32 aggr_on_da_count; + uint aggr_on_count; + uint aggr_on_da_count; const struct f_line *merge_by; enum aggregation_mode aggr_mode; bool logging; @@ -77,8 +77,8 @@ struct aggregator_proto { /* Aggregator rule */ struct aggr_item *aggr_on; - u32 aggr_on_count; - u32 aggr_on_da_count; + uint aggr_on_count; + uint aggr_on_da_count; /* Merge filter */ const struct f_line *merge_by; @@ -87,7 +87,7 @@ struct aggregator_proto { /* Aggregation trie */ struct trie_node *root; struct slab *trie_slab; - u32 addr_type; + uint addr_type; int bitmap_size; bool initial_feed; bool logging; -- 2.47.2