From 36be387547aa5a5ea29091d9eb57a20b00cad031 Mon Sep 17 00:00:00 2001 From: Peter Lieven Date: Thu, 6 Dec 2012 10:38:28 +0100 Subject: [PATCH] SOCKET remove useless code At this point in iscsi_write_to_socket() pdu->written can only be equal to total. Signed-off-by: Peter Lieven --- lib/socket.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/socket.c b/lib/socket.c index 5a8ff60..c7f9c4f 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -542,12 +542,10 @@ iscsi_write_to_socket(struct iscsi_context *iscsi) pdu->out_written += count; } - if (pdu->written == total) { - if (pdu->flags & ISCSI_PDU_DELETE_WHEN_SENT) { - iscsi_free_pdu(iscsi, pdu); - } - iscsi->outqueue_current = NULL; + if (pdu->flags & ISCSI_PDU_DELETE_WHEN_SENT) { + iscsi_free_pdu(iscsi, pdu); } + iscsi->outqueue_current = NULL; } return 0; }