ctdb-common: Use correct return type for tevent_queue_add_entry
authorAmitay Isaacs <amitay@gmail.com>
Tue, 3 Jul 2018 04:08:22 +0000 (14:08 +1000)
committerMartin Schwenke <martins@samba.org>
Wed, 4 Jul 2018 21:56:42 +0000 (23:56 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13493

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/common/sock_io.c

index 51341ce023ebc75f70573c7b7c7660492146a118..b5c9332526b2af307922eb5f97fbc3b6cf7fe0df 100644 (file)
@@ -278,7 +278,7 @@ int sock_queue_write(struct sock_queue *queue, uint8_t *buf, size_t buflen)
 {
        struct tevent_req *req;
        struct sock_queue_write_state *state;
-       bool status;
+       struct tevent_queue_entry *qentry;
 
        if (buflen >= INT32_MAX) {
                return -1;
@@ -292,9 +292,9 @@ int sock_queue_write(struct sock_queue *queue, uint8_t *buf, size_t buflen)
        state->pkt = buf;
        state->pkt_size = (uint32_t)buflen;
 
-       status = tevent_queue_add_entry(queue->queue, queue->ev, req,
+       qentry = tevent_queue_add_entry(queue->queue, queue->ev, req,
                                        sock_queue_trigger, queue);
-       if (! status) {
+       if (qentry == NULL) {
                talloc_free(req);
                return -1;
        }