next_pkt:
ret = ctdb_read_packet(conn->fd, conn->timeout, mem_ctx, &hdr);
- if (hdr == NULL || ret != 0) {
+ if (ret != 0) {
DBG_ERR("ctdb_read_packet failed: %s\n", strerror(ret));
cluster_fatal("failed to read data from ctdbd\n");
return -1;
}
+ SMB_ASSERT(hdr != NULL);
DEBUG(11, ("Received ctdb packet\n"));
ctdb_packet_dump(hdr);
DBG_ERR("ctdb_read_packet failed: %s\n", strerror(ret));
cluster_fatal("failed to read data from ctdbd\n");
}
+ SMB_ASSERT(hdr != NULL);
ret = ctdb_handle_message(ev, conn, hdr);
DBG_ERR("ctdb_read_packet failed: %s\n", strerror(ret));
cluster_fatal("failed to read data from ctdbd\n");
}
+ SMB_ASSERT(hdr != NULL);
if (hdr->operation != CTDB_REQ_MESSAGE) {
DEBUG(0, ("Got operation %u, expected a message\n",
ret = ctdb_pkt_recv_recv(subreq, state, &hdr);
TALLOC_FREE(subreq);
- if ((hdr == NULL) || tevent_req_error(req, ret)) {
+ if (tevent_req_error(req, ret)) {
DBG_ERR("ctdb_pkt_recv_recv returned %s\n", strerror(ret));
return;
}
+ SMB_ASSERT(hdr != NULL);
if (hdr->operation != CTDB_REPLY_CALL) {
DBG_ERR("received invalid reply\n");