diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-05-17 03:08:14 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-05-17 15:04:53 -0400 |
commit | b1e41d8cd43910fee82f27ab1381bc6cd66910b3 (patch) | |
tree | d653bbb80bf2b3144e05223413f6792c87fc3d28 /drivers/target/iscsi | |
parent | 8da10935bc8358f03c9d90ed2e4a3bbaa19940ab (diff) |
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: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi')
-rw-r--r-- | drivers/target/iscsi/iscsi_target_parameters.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/target/iscsi/iscsi_target_parameters.c b/drivers/target/iscsi/iscsi_target_parameters.c index ad3b3c1605d8..ed5241e7f12a 100644 --- a/drivers/target/iscsi/iscsi_target_parameters.c +++ b/drivers/target/iscsi/iscsi_target_parameters.c | |||
@@ -1037,13 +1037,6 @@ static char *iscsi_check_valuelist_for_support( | |||
1037 | tmp2 = strchr(acceptor_values, ','); | 1037 | tmp2 = strchr(acceptor_values, ','); |
1038 | if (tmp2) | 1038 | if (tmp2) |
1039 | *tmp2 = '\0'; | 1039 | *tmp2 = '\0'; |
1040 | if (!acceptor_values || !proposer_values) { | ||
1041 | if (tmp1) | ||
1042 | *tmp1 = ','; | ||
1043 | if (tmp2) | ||
1044 | *tmp2 = ','; | ||
1045 | return NULL; | ||
1046 | } | ||
1047 | if (!strcmp(acceptor_values, proposer_values)) { | 1040 | if (!strcmp(acceptor_values, proposer_values)) { |
1048 | if (tmp2) | 1041 | if (tmp2) |
1049 | *tmp2 = ','; | 1042 | *tmp2 = ','; |
@@ -1053,8 +1046,6 @@ static char *iscsi_check_valuelist_for_support( | |||
1053 | *tmp2++ = ','; | 1046 | *tmp2++ = ','; |
1054 | 1047 | ||
1055 | acceptor_values = tmp2; | 1048 | acceptor_values = tmp2; |
1056 | if (!acceptor_values) | ||
1057 | break; | ||
1058 | } while (acceptor_values); | 1049 | } while (acceptor_values); |
1059 | if (tmp1) | 1050 | if (tmp1) |
1060 | *tmp1++ = ','; | 1051 | *tmp1++ = ','; |