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