git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a438cc
)
tdb: Fix a C++ warning
author
Volker Lendecke
<vl@samba.org>
Fri, 6 Nov 2009 13:04:49 +0000
(14:04 +0100)
committer
Volker Lendecke
<vl@samba.org>
Sat, 7 Nov 2009 23:29:39 +0000
(
00:29
+0100)
lib/tdb/common/check.c
patch
|
blob
|
history
diff --git
a/lib/tdb/common/check.c
b/lib/tdb/common/check.c
index 4924734fdd8134c7db1a2b2972631d2988f280ce..f0a15f801b6e51c76cbff860ab007bfad4b0878c 100644
(file)
--- 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;