From 54282e9f4eda083e70c7e56dda2bf425209add6d Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 10 Aug 2011 19:42:54 +0200 Subject: [PATCH] Fix a c++ warning --- lib/ccan/tally/tally.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ccan/tally/tally.c b/lib/ccan/tally/tally.c index 0d49319608..d3d320eb1b 100644 --- a/lib/ccan/tally/tally.c +++ b/lib/ccan/tally/tally.c @@ -31,7 +31,8 @@ struct tally *tally_new(unsigned buckets) /* Overly cautious check for overflow. */ if (sizeof(*tally) * buckets / sizeof(*tally) != buckets) return NULL; - tally = malloc(sizeof(*tally) + sizeof(tally->counts[0])*(buckets-1)); + tally = (struct tally *)malloc( + sizeof(*tally) + sizeof(tally->counts[0])*(buckets-1)); if (tally) { tally->max = ((size_t)1 << (SIZET_BITS - 1)); tally->min = ~tally->max; -- 2.34.1