summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-11-06 14:04:49 +0100
committerStefan Metzmacher <metze@samba.org>2009-12-16 08:03:53 +0100
commite0f59b0a192b4bb184cb83a51bcd3d13f35e03f1 (patch)
tree8293dde6821d1f9581078ce384fd90dfc0964e48
parenta96af9815b9d2b4673baa92539e6523159b115eb (diff)
downloadsamba-e0f59b0a192b4bb184cb83a51bcd3d13f35e03f1.tar.gz
samba-e0f59b0a192b4bb184cb83a51bcd3d13f35e03f1.tar.xz
samba-e0f59b0a192b4bb184cb83a51bcd3d13f35e03f1.zip
tdb: Fix a C++ warning (cherry picked from samba commit be88a126ea50ea7e41583f402013c63234305e48)
Signed-off-by: Stefan Metzmacher <metze@samba.org> (This used to be ctdb commit 6126f04bd4982b66564dcccd92a15baf9cb856f3)
-rw-r--r--ctdb/lib/tdb/common/check.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ctdb/lib/tdb/common/check.c b/ctdb/lib/tdb/common/check.c
index 4924734fdd..f0a15f801b 100644
--- a/ctdb/lib/tdb/common/check.c
+++ b/ctdb/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;