diff options
author | Volker Lendecke <vl@samba.org> | 2011-08-10 19:42:54 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2011-08-10 19:56:09 +0200 |
commit | 54282e9f4eda083e70c7e56dda2bf425209add6d (patch) | |
tree | 923fff40bdb73edb48d4112dd393e8acce6471c9 | |
parent | 38fb4df6944ee660044788d5a8cb6764d8a2caef (diff) | |
download | samba-54282e9f4eda083e70c7e56dda2bf425209add6d.tar.gz samba-54282e9f4eda083e70c7e56dda2bf425209add6d.tar.xz samba-54282e9f4eda083e70c7e56dda2bf425209add6d.zip |
Fix a c++ warning
-rw-r--r-- | lib/ccan/tally/tally.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/ccan/tally/tally.c b/lib/ccan/tally/tally.c index 0d49319608d..d3d320eb1b0 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; |