Skip to content

Commit 309a3ee

Browse files
committed
lib: cmetrics: upgrade to v1.0.5
Signed-off-by: Eduardo Silva <[email protected]>
1 parent 813e5b9 commit 309a3ee

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/cmetrics/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
66
# CMetrics Version
77
set(CMT_VERSION_MAJOR 1)
88
set(CMT_VERSION_MINOR 0)
9-
set(CMT_VERSION_PATCH 4)
9+
set(CMT_VERSION_PATCH 5)
1010
set(CMT_VERSION_STR "${CMT_VERSION_MAJOR}.${CMT_VERSION_MINOR}.${CMT_VERSION_PATCH}")
1111

1212
# Include helpers

lib/cmetrics/src/cmt_cat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ static inline int cat_histogram_values(struct cmt_metric *metric_dst, struct cmt
108108
}
109109
}
110110

111-
for (i = 0; i < histogram->buckets->count; i++) {
111+
for (i = 0; i <= histogram->buckets->count; i++) {
112112
/* histogram buckets are always integers, no need to convert them */
113113
metric_dst->hist_buckets[i] += metric_src->hist_buckets[i];
114114
}

lib/cmetrics/src/cmt_histogram.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ struct cmt_histogram_buckets *cmt_histogram_buckets_create_size(double *bkts, si
3636
}
3737

3838
/* besides buckets set by the user, we add an implicit bucket for +inf */
39-
upper_bounds = calloc(1, sizeof(double) * count + 1);
39+
upper_bounds = calloc(1, sizeof(double) * (count + 1));
4040
if (!upper_bounds) {
4141
cmt_errno();
4242
return NULL;

0 commit comments

Comments
 (0)