swrap: Fix signed comparsion warnings
authorAndreas Schneider <asn@samba.org>
Tue, 25 Aug 2015 15:21:05 +0000 (17:21 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 8 Sep 2015 11:47:20 +0000 (13:47 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
lib/socket_wrapper/socket_wrapper.c

index 01ab8d52d38d23ad703bc634fe531efc34a8f6f7..12eb010ae2a807445bdc733d6d84d7797e238b5d 100644 (file)
@@ -3799,7 +3799,7 @@ static ssize_t swrap_sendmsg_before(int fd,
                msg->msg_iovlen = i;
                if (msg->msg_iovlen == 0) {
                        *tmp_iov = msg->msg_iov[0];
-                       tmp_iov->iov_len = MIN(tmp_iov->iov_len, mtu);
+                       tmp_iov->iov_len = MIN(tmp_iov->iov_len, (size_t)mtu);
                        msg->msg_iov = tmp_iov;
                        msg->msg_iovlen = 1;
                }
@@ -4016,7 +4016,7 @@ static int swrap_recvmsg_before(int fd,
                msg->msg_iovlen = i;
                if (msg->msg_iovlen == 0) {
                        *tmp_iov = msg->msg_iov[0];
-                       tmp_iov->iov_len = MIN(tmp_iov->iov_len, mtu);
+                       tmp_iov->iov_len = MIN(tmp_iov->iov_len, (size_t)mtu);
                        msg->msg_iov = tmp_iov;
                        msg->msg_iovlen = 1;
                }