diff options
author | 2017-05-11 13:36:42 -0700 | |
---|---|---|
committer | 2017-05-11 13:36:42 -0700 | |
commit | 61f86d9bd795a65d94df72a47fbd313d9084d8e7 (patch) | |
tree | 7ffcbc1d894408ba391797581be166963b748d15 /src/core/lib/support/histogram.c | |
parent | 45b89fb11ca3cd524787aeba7a1270f744a1256c (diff) |
C++ compatibility fixes
Diffstat (limited to 'src/core/lib/support/histogram.c')
-rw-r--r-- | src/core/lib/support/histogram.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/lib/support/histogram.c b/src/core/lib/support/histogram.c index ba8176bb05..c88695409d 100644 --- a/src/core/lib/support/histogram.c +++ b/src/core/lib/support/histogram.c @@ -88,7 +88,7 @@ static double bucket_start(gpr_histogram *h, double x) { gpr_histogram *gpr_histogram_create(double resolution, double max_bucket_start) { - gpr_histogram *h = gpr_malloc(sizeof(gpr_histogram)); + gpr_histogram *h = (gpr_histogram *)gpr_malloc(sizeof(gpr_histogram)); GPR_ASSERT(resolution > 0.0); GPR_ASSERT(max_bucket_start > resolution); h->sum = 0.0; @@ -102,7 +102,7 @@ gpr_histogram *gpr_histogram_create(double resolution, h->num_buckets = bucket_for_unchecked(h, max_bucket_start) + 1; GPR_ASSERT(h->num_buckets > 1); GPR_ASSERT(h->num_buckets < 100000000); - h->buckets = gpr_zalloc(sizeof(uint32_t) * h->num_buckets); + h->buckets = (uint32_t *)gpr_zalloc(sizeof(uint32_t) * h->num_buckets); return h; } |