From 831ecb3656f93127b7737512723b76af892f617c Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Fri, 20 Feb 2015 20:39:51 -0800 Subject: [PATCH] iscsi-command.c: use pdu->expxferlen instead of pdu->expxferlen Both are the same value at this point but it is better to do the computation only based on pdy-> fields. Signed-off-by: Ronnie Sahlberg --- lib/iscsi-command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/iscsi-command.c b/lib/iscsi-command.c index f49f150..22a7284 100644 --- a/lib/iscsi-command.c +++ b/lib/iscsi-command.c @@ -326,7 +326,7 @@ iscsi_scsi_command_async(struct iscsi_context *iscsi, int lun, * subtract from first_burst_length. */ if (!(flags & ISCSI_PDU_SCSI_FINAL)) { - uint32_t len = task->expxferlen - pdu->payload_len; + uint32_t len = pdu->expxferlen - pdu->payload_len; if (len > iscsi->first_burst_length) { len = iscsi->first_burst_length;