From 8bc0046f5165a884bd26d3f17a92d3da284cd200 Mon Sep 17 00:00:00 2001 From: Peter Lieven Date: Mon, 28 Jan 2013 09:36:00 +0100 Subject: [PATCH] changed iscsi_data.size from int to size_t iscsi_data.size is used as parameter to memory operation functions (such as malloc) which except size_t rather than int. Signed-off-by: Peter Lieven --- include/iscsi.h | 2 +- lib/socket.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/iscsi.h b/include/iscsi.h index 2c2c720..26b1d24 100644 --- a/include/iscsi.h +++ b/include/iscsi.h @@ -573,7 +573,7 @@ iscsi_task_mgmt_target_cold_reset_async(struct iscsi_context *iscsi, */ struct iscsi_data { - int size; + size_t size; unsigned char *data; }; diff --git a/lib/socket.c b/lib/socket.c index c30f862..54d6234 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -753,8 +753,8 @@ iscsi_queue_pdu(struct iscsi_context *iscsi, struct iscsi_pdu *pdu) unsigned long crc; if (pdu->outdata.size < ISCSI_RAW_HEADER_SIZE + 4) { - iscsi_set_error(iscsi, "PDU too small (%d) to contain header digest", - pdu->outdata.size); + iscsi_set_error(iscsi, "PDU too small (%u) to contain header digest", + (unsigned int) pdu->outdata.size); return -1; }