diff options
Diffstat (limited to 'source4/lib/tdb/common/io.c')
-rw-r--r-- | source4/lib/tdb/common/io.c | 5 |
1 files changed, 3 insertions, 2 deletions
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; |