@@ -222,7 +222,10 @@ int64_t hdr_size_of_equivalent_value_range(const struct hdr_histogram* h, int64_
222222 return INT64_C (1 ) << (h -> unit_magnitude + adjusted_bucket );
223223}
224224
225- static int64_t hdr_size_of_equivalent_value_range_given_bucket_indices (const struct hdr_histogram * h , int64_t value , int32_t bucket_index , int32_t sub_bucket_index )
225+ static int64_t size_of_equivalent_value_range_given_bucket_indices (
226+ const struct hdr_histogram * h ,
227+ int32_t bucket_index ,
228+ int32_t sub_bucket_index )
226229{
227230 const int32_t adjusted_bucket = (sub_bucket_index >= h -> sub_bucket_count ) ? (bucket_index + 1 ) : bucket_index ;
228231 return INT64_C (1 ) << (h -> unit_magnitude + adjusted_bucket );
@@ -235,7 +238,10 @@ static int64_t lowest_equivalent_value(const struct hdr_histogram* h, int64_t va
235238 return value_from_index (bucket_index , sub_bucket_index , h -> unit_magnitude );
236239}
237240
238- static int64_t lowest_equivalent_value_given_bucket_indices (const struct hdr_histogram * h , int64_t value , int32_t bucket_index , int32_t sub_bucket_index )
241+ static int64_t lowest_equivalent_value_given_bucket_indices (
242+ const struct hdr_histogram * h ,
243+ int32_t bucket_index ,
244+ int32_t sub_bucket_index )
239245{
240246 return value_from_index (bucket_index , sub_bucket_index , h -> unit_magnitude );
241247}
@@ -811,8 +817,9 @@ static bool move_next(struct hdr_iter* iter)
811817 const int64_t value = hdr_value_at_index (iter -> h , iter -> counts_index );
812818 const int32_t bucket_index = get_bucket_index (iter -> h , value );
813819 const int32_t sub_bucket_index = get_sub_bucket_index (value , bucket_index , iter -> h -> unit_magnitude );
814- const int64_t leq = lowest_equivalent_value_given_bucket_indices (iter -> h , value , bucket_index , sub_bucket_index );
815- const int64_t size_of_equivalent_value_range = hdr_size_of_equivalent_value_range_given_bucket_indices (iter -> h , value , bucket_index , sub_bucket_index );
820+ const int64_t leq = lowest_equivalent_value_given_bucket_indices (iter -> h , bucket_index , sub_bucket_index );
821+ const int64_t size_of_equivalent_value_range = size_of_equivalent_value_range_given_bucket_indices (
822+ iter -> h , bucket_index , sub_bucket_index );
816823 iter -> lowest_equivalent_value = leq ;
817824 iter -> value = value ;
818825 iter -> highest_equivalent_value = leq + size_of_equivalent_value_range - 1 ;
0 commit comments