summaryrefslogtreecommitdiff
path: root/source4/cluster/ctdb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/cluster/ctdb')
-rw-r--r--source4/cluster/ctdb/client/ctdb_client.c2
-rw-r--r--source4/cluster/ctdb/common/ctdb_io.c5
-rw-r--r--source4/cluster/ctdb/common/ctdb_util.c2
-rw-r--r--source4/cluster/ctdb/ctdb_cluster.c8
4 files changed, 9 insertions, 8 deletions
diff --git a/source4/cluster/ctdb/client/ctdb_client.c b/source4/cluster/ctdb/client/ctdb_client.c
index b569a69c8d..626ecf01c7 100644
--- a/source4/cluster/ctdb/client/ctdb_client.c
+++ b/source4/cluster/ctdb/client/ctdb_client.c
@@ -1970,7 +1970,7 @@ int ctdb_ctrl_set_tunable(struct ctdb_context *ctdb,
int ret;
data.dsize = offsetof(struct ctdb_control_set_tunable, name) + strlen(name) + 1;
- data.dptr = talloc_size(ctdb, data.dsize);
+ data.dptr = talloc_array(ctdb, unsigned char, data.dsize);
CTDB_NO_MEMORY(ctdb, data.dptr);
t = (struct ctdb_control_set_tunable *)data.dptr;
diff --git a/source4/cluster/ctdb/common/ctdb_io.c b/source4/cluster/ctdb/common/ctdb_io.c
index 3cc522b58a..5c418e4956 100644
--- a/source4/cluster/ctdb/common/ctdb_io.c
+++ b/source4/cluster/ctdb/common/ctdb_io.c
@@ -73,8 +73,9 @@ static void queue_io_read(struct ctdb_queue *queue)
}
- queue->partial.data = talloc_realloc_size(queue, queue->partial.data,
- num_ready + queue->partial.length);
+ queue->partial.data = talloc_realloc(queue, queue->partial.data,
+ uint8_t,
+ num_ready + queue->partial.length);
if (queue->partial.data == NULL) {
DEBUG(0,("read error alloc failed for %u\n",
diff --git a/source4/cluster/ctdb/common/ctdb_util.c b/source4/cluster/ctdb/common/ctdb_util.c
index 54b1e4e7ff..f11388331d 100644
--- a/source4/cluster/ctdb/common/ctdb_util.c
+++ b/source4/cluster/ctdb/common/ctdb_util.c
@@ -51,7 +51,7 @@ void ctdb_set_error(struct ctdb_context *ctdb, const char *fmt, ...)
/*
a fatal internal error occurred - no hope for recovery
*/
-void ctdb_fatal(struct ctdb_context *ctdb, const char *msg)
+_NORETURN_ void ctdb_fatal(struct ctdb_context *ctdb, const char *msg)
{
DEBUG(0,("ctdb fatal error: %s\n", msg));
abort();
diff --git a/source4/cluster/ctdb/ctdb_cluster.c b/source4/cluster/ctdb/ctdb_cluster.c
index 8acb794251..d416a63374 100644
--- a/source4/cluster/ctdb/ctdb_cluster.c
+++ b/source4/cluster/ctdb/ctdb_cluster.c
@@ -52,7 +52,7 @@ struct cluster_state {
*/
static struct server_id ctdb_id(struct cluster_ops *ops, uint32_t id)
{
- struct cluster_state *state = ops->private;
+ struct cluster_state *state = (struct cluster_state *)ops->private;
struct ctdb_context *ctdb = state->ctdb;
struct server_id server_id;
server_id.node = ctdb_get_vnn(ctdb);
@@ -100,7 +100,7 @@ static struct tdb_wrap *ctdb_tdb_tmp_open(struct cluster_ops *ops,
*/
static void *ctdb_backend_handle(struct cluster_ops *ops)
{
- struct cluster_state *state = ops->private;
+ struct cluster_state *state = (struct cluster_state *)ops->private;
return (void *)state->ctdb;
}
@@ -138,7 +138,7 @@ static NTSTATUS ctdb_message_init(struct cluster_ops *ops,
struct server_id server,
cluster_message_fn_t handler)
{
- struct cluster_state *state = ops->private;
+ struct cluster_state *state = (struct cluster_state *)ops->private;
struct ctdb_handler_state *h;
int ret;
@@ -169,7 +169,7 @@ static NTSTATUS ctdb_message_init(struct cluster_ops *ops,
static NTSTATUS ctdb_message_send(struct cluster_ops *ops,
struct server_id server, DATA_BLOB *data)
{
- struct cluster_state *state = ops->private;
+ struct cluster_state *state = (struct cluster_state *)ops->private;
struct ctdb_context *ctdb = state->ctdb;
TDB_DATA tdata;
int ret;