From 118c064a473562274bff8fb47f37437db904b8fb Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 20 Oct 2006 08:06:14 +0000 Subject: r19423: merge some tdb changes from SAMBA_3_0 to SAMBA_4_0 this is in preparation of a merge in the other direction (This used to be commit db3211079fd594aa03c3b9bb3eb6ad86bdd32837) --- source4/lib/tdb/common/io.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source4/lib/tdb/common/io.c') diff --git a/source4/lib/tdb/common/io.c b/source4/lib/tdb/common/io.c index 383023e88a..5d2c5c8e2e 100644 --- a/source4/lib/tdb/common/io.c +++ b/source4/lib/tdb/common/io.c @@ -102,7 +102,7 @@ static int tdb_write(struct tdb_context *tdb, tdb_off_t off, /* Endian conversion: we only ever deal with 4 byte quantities */ void *tdb_convert(void *buf, u32 size) { - u32 i, *p = buf; + u32 i, *p = (u32 *)buf; for (i = 0; i < size / 4; i++) p[i] = TDB_BYTEREV(p[i]); return buf; @@ -282,7 +282,8 @@ int tdb_expand(struct tdb_context *tdb, tdb_off_t size) tdb->map_size += size; if (tdb->flags & TDB_INTERNAL) { - char *new_map_ptr = realloc(tdb->map_ptr, tdb->map_size); + char *new_map_ptr = (char *)realloc(tdb->map_ptr, + tdb->map_size); if (!new_map_ptr) { tdb->map_size -= size; goto fail; -- cgit