diff options
Diffstat (limited to 'source3/tdb/io.c')
-rw-r--r-- | source3/tdb/io.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/tdb/io.c b/source3/tdb/io.c index ac6f4cdf57..5d7edfefff 100644 --- a/source3/tdb/io.c +++ b/source3/tdb/io.c @@ -124,7 +124,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; @@ -304,7 +304,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; @@ -360,7 +361,7 @@ char *tdb_alloc_read(struct tdb_context *tdb, tdb_off_t offset, tdb_len_t len) len = 1; } - if (!(buf = malloc(len))) { + if (!(buf = (char *)malloc(len))) { /* Ensure ecode is set for log fn. */ tdb->ecode = TDB_ERR_OOM; TDB_LOG((tdb, 0,"tdb_alloc_read malloc failed len=%d (%s)\n", |