]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib: Fix a signed/unsigned warning
authorVolker Lendecke <vl@samba.org>
Thu, 12 Mar 2020 12:34:43 +0000 (13:34 +0100)
committerRalph Boehme <slow@samba.org>
Wed, 8 Apr 2020 14:46:39 +0000 (14:46 +0000)
The types are deliberately distinct, but nwritten is >0 or ==-1, so
this should be okay.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/lib/ctdbd_conn.c

index e968ec5e49125c57a57172294736317b1d35d486..37d54402af4ec732c191d386f9725c8aee9dca9a 100644 (file)
@@ -1380,7 +1380,7 @@ static struct tevent_req *ctdb_pkt_send_send(TALLOC_CTX *mem_ctx,
         */
 
        nwritten = writev(conn->fd, state->iov, state->iovcnt);
-       if (nwritten == state->packet_len) {
+       if ((size_t)nwritten == state->packet_len) {
                DBG_DEBUG("Finished sending reqid [%" PRIu32 "]\n", reqid);
 
                *req_state = DBWRAP_REQ_DISPATCHED;