r22041: merge trivial changes from samba3
[ira/wip.git] / source / lib / tdb / common / tdb.c
index a6b472ae94f135f9841ae6b76cf42f4ddce2589b..25103d826e5f0e9398e76f371ac9ef437b87a993 100644 (file)
@@ -564,9 +564,10 @@ int tdb_append(struct tdb_context *tdb, TDB_DATA key, TDB_DATA new_dbuf)
        dbuf = tdb_fetch(tdb, key);
 
        if (dbuf.dptr == NULL) {
-               dbuf.dptr = malloc(new_dbuf.dsize);
+               dbuf.dptr = (unsigned char *)malloc(new_dbuf.dsize);
        } else {
-               dbuf.dptr = realloc(dbuf.dptr, dbuf.dsize + new_dbuf.dsize);
+               dbuf.dptr = (unsigned char *)realloc(dbuf.dptr,
+                                                    dbuf.dsize + new_dbuf.dsize);
        }
 
        if (dbuf.dptr == NULL) {