Skip to content

Commit 1ebb2c7

Browse files
committed
Remove unused value parameter.
1 parent 1bc7ab0 commit 1ebb2c7

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.5)
22

3-
project(hdr_histogram VERSION 0.10.0 LANGUAGES C)
3+
project(hdr_histogram VERSION 0.11.3 LANGUAGES C)
44

55
include(GNUInstallDirs)
66
include(CMakePackageConfigHelpers)

src/hdr_histogram.c

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)