aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/iscsi
diff options
context:
space:
mode:
authorJoern Engel <joern@logfs.org>2014-09-02 17:49:50 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2014-09-17 16:19:16 -0400
commitcb35484231e0b7edf23e192867e5fba955e584cb (patch)
tree2e992dd541b91d8d51bea274d79830455d00a6d1 /drivers/target/iscsi
parentfbecb6596a80554423d00aba92f2752a2ee0a62d (diff)
iscsi-target: remove always-true conditions
Found by coverity. InitiatorName and InitiatorAlias are static arrays and therefore always non-NULL. At some point in the past they may have been dynamically allocated, but for current code the condition is useless. If the intent was to check InitiatorName[0] instead, I cannot find a use for that either. Let's get rid of it. Signed-off-by: Joern Engel <joern@logfs.org> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi')
-rw-r--r--drivers/target/iscsi/iscsi_target_configfs.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/target/iscsi/iscsi_target_configfs.c b/drivers/target/iscsi/iscsi_target_configfs.c
index ae03f3e5de1e..9059c1e0b26e 100644
--- a/drivers/target/iscsi/iscsi_target_configfs.c
+++ b/drivers/target/iscsi/iscsi_target_configfs.c
@@ -669,12 +669,10 @@ static ssize_t lio_target_nacl_show_info(
669 } else { 669 } else {
670 sess = se_sess->fabric_sess_ptr; 670 sess = se_sess->fabric_sess_ptr;
671 671
672 if (sess->sess_ops->InitiatorName) 672 rb += sprintf(page+rb, "InitiatorName: %s\n",
673 rb += sprintf(page+rb, "InitiatorName: %s\n", 673 sess->sess_ops->InitiatorName);
674 sess->sess_ops->InitiatorName); 674 rb += sprintf(page+rb, "InitiatorAlias: %s\n",
675 if (sess->sess_ops->InitiatorAlias) 675 sess->sess_ops->InitiatorAlias);
676 rb += sprintf(page+rb, "InitiatorAlias: %s\n",
677 sess->sess_ops->InitiatorAlias);
678 676
679 rb += sprintf(page+rb, "LIO Session ID: %u " 677 rb += sprintf(page+rb, "LIO Session ID: %u "
680 "ISID: 0x%02x %02x %02x %02x %02x %02x " 678 "ISID: 0x%02x %02x %02x %02x %02x %02x "