Blame SOURCES/0010-Add-a-cast-to-ssize_t.patch

dc245c
From b555bbebdd1c92b025a44955a988cc2eed646c2b Mon Sep 17 00:00:00 2001
dc245c
From: Ronnie Sahlberg <ronniesahlberg@gmail.com>
dc245c
Date: Sat, 29 Jun 2013 11:12:41 -0700
dc245c
Subject: [RHEL7 libiscsi PATCH 10/18] Add a cast to ssize_t
dc245c
dc245c
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
dc245c
(cherry-picked from upstream commit b555bbebdd1c92b025a44955a988cc2eed646c2b)
dc245c
---
dc245c
 lib/socket.c | 2 +-
dc245c
 1 file changed, 1 insertion(+), 1 deletion(-)
dc245c
dc245c
diff --git a/lib/socket.c b/lib/socket.c
dc245c
index a855f92..6fc3b41 100644
dc245c
--- a/lib/socket.c
dc245c
+++ b/lib/socket.c
dc245c
@@ -517,7 +517,7 @@ iscsi_read_from_socket(struct iscsi_context *iscsi)
dc245c
 	}
dc245c
 
dc245c
 	data_size = iscsi_get_pdu_data_size(&in->hdr[0]);
dc245c
-	if (data_size < 0 || data_size > iscsi->initiator_max_recv_data_segment_length) {
dc245c
+	if (data_size < 0 || data_size > (ssize_t)iscsi->initiator_max_recv_data_segment_length) {
dc245c
 		iscsi_set_error(iscsi, "Invalid data size received from target (%d)", (int)data_size);
dc245c
 		return -1;
dc245c
 	}
dc245c
-- 
dc245c
1.8.1.4
dc245c