mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-19 10:06:08 +07:00
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>
This commit is contained in:
parent
fbecb6596a
commit
cb35484231
@ -669,10 +669,8 @@ static ssize_t lio_target_nacl_show_info(
|
|||||||
} else {
|
} else {
|
||||||
sess = se_sess->fabric_sess_ptr;
|
sess = se_sess->fabric_sess_ptr;
|
||||||
|
|
||||||
if (sess->sess_ops->InitiatorName)
|
|
||||||
rb += sprintf(page+rb, "InitiatorName: %s\n",
|
rb += sprintf(page+rb, "InitiatorName: %s\n",
|
||||||
sess->sess_ops->InitiatorName);
|
sess->sess_ops->InitiatorName);
|
||||||
if (sess->sess_ops->InitiatorAlias)
|
|
||||||
rb += sprintf(page+rb, "InitiatorAlias: %s\n",
|
rb += sprintf(page+rb, "InitiatorAlias: %s\n",
|
||||||
sess->sess_ops->InitiatorAlias);
|
sess->sess_ops->InitiatorAlias);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user