}
if (cnt < sizeof(*hdr)) {
- DEBUG(0,("Bad packet length %u in client\n", cnt));
+ DEBUG(0,("Bad packet length %u in client\n", (unsigned)cnt));
goto done;
}
if (cnt != hdr->length) {
}
h->data = data;
- DEBUG(3,("ctdb_fetch_lock: key=%*.*s\n", key.dsize, key.dsize,
+ DEBUG(3,("ctdb_fetch_lock: key=%*.*s\n", (int)key.dsize, (int)key.dsize,
(const char *)key.dptr));
again:
if (data.dsize != sizeof(struct ctdb_statistics)) {
DEBUG(0,(__location__ " Wrong statistics size %u - expected %u\n",
- data.dsize, sizeof(struct ctdb_statistics)));
+ (unsigned)data.dsize, (unsigned)sizeof(struct ctdb_statistics)));
return -1;
}
}
if (data.dsize != sizeof(uint32_t)) {
DEBUG(0,("Bad control reply size in ctdb_get_debuglevel (got %u)\n",
- data.dsize));
+ (unsigned)data.dsize));
return -1;
}
*level = *(uint32_t *)data.dptr;
if (data.dsize < sizeof(uint32_t) ||
d->length != data.dsize) {
- DEBUG(0,("Bad data size %u in traverse_handler\n", data.dsize));
+ DEBUG(0,("Bad data size %u in traverse_handler\n", (unsigned)data.dsize));
state->done = True;
return;
}
}
res = ctdb_register_message_handler(ctdb, client, srvid, daemon_message_handler, client);
if (res != 0) {
- DEBUG(0,(__location__ " Failed to register handler %llu in daemon\n", srvid));
+ DEBUG(0,(__location__ " Failed to register handler %llu in daemon\n",
+ (unsigned long long)srvid));
} else {
- DEBUG(2,(__location__ " Registered message handler for srvid=%llu\n", srvid));
+ DEBUG(2,(__location__ " Registered message handler for srvid=%llu\n",
+ (unsigned long long)srvid));
}
return res;
}
hdr = (struct ctdb_req_header *)talloc_size(mem_ctx, size);
if (hdr == NULL) {
DEBUG(0,("Unable to allocate packet for operation %u of length %u\n",
- operation, length));
+ operation, (unsigned)length));
return NULL;
}
talloc_set_name_const(hdr, type);
hdr = (struct ctdb_req_header *)ctdb->methods->allocate_pkt(mem_ctx, size);
if (hdr == NULL) {
DEBUG(0,("Unable to allocate transport packet for operation %u of length %u\n",
- operation, length));
+ operation, (unsigned)length));
return NULL;
}
talloc_set_name_const(hdr, type);
nread = read(queue->fd, queue->partial.data + queue->partial.length, num_ready);
if (nread <= 0) {
- DEBUG(0,("read error nread=%d\n", nread));
+ DEBUG(0,("read error nread=%d\n", (int)nread));
goto failed;
}
queue->partial.data = talloc_memdup(queue, data, nread);
if (queue->partial.data == NULL) {
DEBUG(0,("read error memdup partial failed for %u\n",
- nread));
+ (unsigned)nread));
goto failed;
}
queue->partial.length = nread;
res = ctdb_dispatch_message(m->ctdb, m->srvid, m->data);
if (res != 0) {
- DEBUG(0, (__location__ " Failed to dispatch message for srvid=%llu\n", m->srvid));
+ DEBUG(0, (__location__ " Failed to dispatch message for srvid=%llu\n",
+ (unsigned long long)m->srvid));
}
talloc_free(m);
}
db_id, max_rsn+1);
if (ret != 0) {
DEBUG(0,(__location__ " Failed to set rsn on node %u to %llu\n",
- nodemap->nodes[i].vnn, max_rsn+1));
+ nodemap->nodes[i].vnn, (unsigned long long)max_rsn+1));
return -1;
}
}
db_id, max_rsn+1);
if (ret != 0) {
DEBUG(0,(__location__ " Failed to delete records on node %u with rsn below %llu\n",
- nodemap->nodes[i].vnn, max_rsn+1));
+ nodemap->nodes[i].vnn, (unsigned long long)max_rsn+1));
return -1;
}
}
#define CHECK_CONTROL_DATA_SIZE(size) do { \
if (indata.dsize != size) { \
DEBUG(0,(__location__ " Invalid data size in opcode %u. Got %u expected %u\n", \
- opcode, indata.dsize, size)); \
+ opcode, (unsigned)indata.dsize, (unsigned)size)); \
return -1; \
} \
} while (0)
}
if (cnt & (CTDB_TCP_ALIGNMENT-1)) {
- DEBUG(0,(__location__ " Length 0x%x not multiple of alignment\n", cnt));
+ DEBUG(0,(__location__ " Length 0x%x not multiple of alignment\n",
+ (unsigned)cnt));
goto failed;
}