From be88a126ea50ea7e41583f402013c63234305e48 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 6 Nov 2009 14:04:49 +0100 Subject: tdb: Fix a C++ warning --- lib/tdb/common/check.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/tdb/common/check.c b/lib/tdb/common/check.c index 4924734fdd..f0a15f801b 100644 --- a/lib/tdb/common/check.c +++ b/lib/tdb/common/check.c @@ -329,7 +329,8 @@ int tdb_check(struct tdb_context *tdb, } /* One big malloc: pointers then bit arrays. */ - hashes = calloc(1, sizeof(hashes[0]) * (1+tdb->header.hash_size) + hashes = (unsigned char **)calloc( + 1, sizeof(hashes[0]) * (1+tdb->header.hash_size) + BITMAP_BITS / CHAR_BIT * (1+tdb->header.hash_size)); if (!hashes) { tdb->ecode = TDB_ERR_OOM; -- cgit