summaryrefslogtreecommitdiff
path: root/source4/cluster/ctdb/common
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-09-08 13:27:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:05:41 -0500
commitdccf3f99e45137b6cd18c1de1c79808ad67130d1 (patch)
tree7c0f8e64f4ded3701818b8968171597eccd62267 /source4/cluster/ctdb/common
parentffeee68e4b72dd94fee57366bd8d38b8c284c3d4 (diff)
downloadsamba-dccf3f99e45137b6cd18c1de1c79808ad67130d1.tar.gz
samba-dccf3f99e45137b6cd18c1de1c79808ad67130d1.tar.bz2
samba-dccf3f99e45137b6cd18c1de1c79808ad67130d1.zip
r25027: Fix more warnings.
(This used to be commit 5085c53fcfade614e83d21fc2c1a5bc43bb2a729)
Diffstat (limited to 'source4/cluster/ctdb/common')
-rw-r--r--source4/cluster/ctdb/common/ctdb_io.c6
-rw-r--r--source4/cluster/ctdb/common/ctdb_ltdb.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/source4/cluster/ctdb/common/ctdb_io.c b/source4/cluster/ctdb/common/ctdb_io.c
index 5c418e4956..ca9c635878 100644
--- a/source4/cluster/ctdb/common/ctdb_io.c
+++ b/source4/cluster/ctdb/common/ctdb_io.c
@@ -115,7 +115,7 @@ static void queue_io_read(struct ctdb_queue *queue)
DEBUG(0,("Invalid packet of length 0\n"));
goto failed;
}
- d2 = talloc_memdup(queue, data, len);
+ d2 = (uint8_t *)talloc_memdup(queue, data, len);
if (d2 == NULL) {
DEBUG(0,("read error memdup failed for %u\n", len));
/* sigh */
@@ -132,7 +132,7 @@ static void queue_io_read(struct ctdb_queue *queue)
queue->partial.data = data;
queue->partial.length = nread;
} else {
- queue->partial.data = talloc_memdup(queue, data, nread);
+ queue->partial.data = (uint8_t *)talloc_memdup(queue, data, nread);
if (queue->partial.data == NULL) {
DEBUG(0,("read error memdup partial failed for %u\n",
(unsigned)nread));
@@ -266,7 +266,7 @@ int ctdb_queue_send(struct ctdb_queue *queue, uint8_t *data, uint32_t length)
pkt = talloc(queue, struct ctdb_queue_pkt);
CTDB_NO_MEMORY(queue->ctdb, pkt);
- pkt->data = talloc_memdup(pkt, data, length2);
+ pkt->data = (uint8_t *)talloc_memdup(pkt, data, length2);
CTDB_NO_MEMORY(queue->ctdb, pkt->data);
pkt->length = length2;
diff --git a/source4/cluster/ctdb/common/ctdb_ltdb.c b/source4/cluster/ctdb/common/ctdb_ltdb.c
index 7db1523ca1..8d8b4fd24a 100644
--- a/source4/cluster/ctdb/common/ctdb_ltdb.c
+++ b/source4/cluster/ctdb/common/ctdb_ltdb.c
@@ -106,7 +106,7 @@ int ctdb_ltdb_fetch(struct ctdb_db_context *ctdb_db,
if (data) {
data->dsize = rec.dsize - sizeof(struct ctdb_ltdb_header);
- data->dptr = talloc_memdup(mem_ctx,
+ data->dptr = (unsigned char *)talloc_memdup(mem_ctx,
sizeof(struct ctdb_ltdb_header)+rec.dptr,
data->dsize);
}
@@ -144,7 +144,7 @@ int ctdb_ltdb_store(struct ctdb_db_context *ctdb_db, TDB_DATA key,
}
rec.dsize = sizeof(*header) + data.dsize;
- rec.dptr = talloc_size(ctdb, rec.dsize);
+ rec.dptr = (unsigned char *)talloc_size(ctdb, rec.dsize);
CTDB_NO_MEMORY(ctdb, rec.dptr);
memcpy(rec.dptr, header, sizeof(*header));