From b1e41d8cd43910fee82f27ab1381bc6cd66910b3 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Thu, 17 May 2012 10:08:14 +0300 Subject: 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 Signed-off-by: Nicholas Bellinger --- drivers/target/iscsi/iscsi_target_parameters.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'drivers') 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( 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++ = ','; -- cgit v1.2.3-58-ga151