summaryrefslogtreecommitdiff
path: root/source4/lib/tdb/common/io.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-10-20 08:06:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:21:29 -0500
commit118c064a473562274bff8fb47f37437db904b8fb (patch)
tree669454db50418bb1d07ec5b1520bae6aecf9c941 /source4/lib/tdb/common/io.c
parent5370afe8c2d9f4b77711010f2ce9ea4fc33886c4 (diff)
downloadsamba-118c064a473562274bff8fb47f37437db904b8fb.tar.gz
samba-118c064a473562274bff8fb47f37437db904b8fb.tar.bz2
samba-118c064a473562274bff8fb47f37437db904b8fb.zip
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)
Diffstat (limited to 'source4/lib/tdb/common/io.c')
-rw-r--r--source4/lib/tdb/common/io.c5
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;