提交 b1e41d8c 编写于 作者: D Dan Carpenter 提交者: Nicholas Bellinger

iscsi-target: remove dead code in iscsi_check_valuelist_for_support

Neither "acceptor_values" nor "proposer_values" can be NULL here when
scanning the value lists for incoming iSCSI login parameters such as
HeaderDigest=CRC32C,None.

Smatch complains because we are not allowed to pass NULL pointers to
strchr().  Also I removed a second later check for "!acceptor_values"
because it gets checked on the next line in the do while condition.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
上级 8da10935
......@@ -1037,13 +1037,6 @@ static char *iscsi_check_valuelist_for_support(
tmp2 = strchr(acceptor_values, ',');
if (tmp2)
*tmp2 = '\0';
if (!acceptor_values || !proposer_values) {
if (tmp1)
*tmp1 = ',';
if (tmp2)
*tmp2 = ',';
return NULL;
}
if (!strcmp(acceptor_values, proposer_values)) {
if (tmp2)
*tmp2 = ',';
......@@ -1053,8 +1046,6 @@ static char *iscsi_check_valuelist_for_support(
*tmp2++ = ',';
acceptor_values = tmp2;
if (!acceptor_values)
break;
} while (acceptor_values);
if (tmp1)
*tmp1++ = ',';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册