diff options
author | Jörn Engel <joern@logfs.org> | 2012-03-15 15:08:03 -0400 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-03-15 22:16:25 -0400 |
commit | a227fb3a5a61e70ae4e4957818a23e9239bf5a43 (patch) | |
tree | 861197e821a8cc347e8ea5788ee4a944c872fcd0 /drivers/target | |
parent | 281689051a628e5341ce1efcfafde9d60f2f6fbb (diff) |
iscsi-target: Remove unused variables in iscsi_target_parameters.c
local_right_val was an obvious case, tmp_ptr is also write-only, but
evades the compiler by being passed to simple_strtoul as char **endp.
Signed-off-by: Joern Engel <joern@logfs.org>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/iscsi/iscsi_target_parameters.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/target/iscsi/iscsi_target_parameters.c b/drivers/target/iscsi/iscsi_target_parameters.c index 5b773160200f..eb05c9d751ea 100644 --- a/drivers/target/iscsi/iscsi_target_parameters.c +++ b/drivers/target/iscsi/iscsi_target_parameters.c | |||
@@ -874,8 +874,8 @@ static int iscsi_check_numerical_value(struct iscsi_param *param, char *value_pt | |||
874 | static int iscsi_check_numerical_range_value(struct iscsi_param *param, char *value) | 874 | static int iscsi_check_numerical_range_value(struct iscsi_param *param, char *value) |
875 | { | 875 | { |
876 | char *left_val_ptr = NULL, *right_val_ptr = NULL; | 876 | char *left_val_ptr = NULL, *right_val_ptr = NULL; |
877 | char *tilde_ptr = NULL, *tmp_ptr = NULL; | 877 | char *tilde_ptr = NULL; |
878 | u32 left_val, right_val, local_left_val, local_right_val; | 878 | u32 left_val, right_val, local_left_val; |
879 | 879 | ||
880 | if (strcmp(param->name, IFMARKINT) && | 880 | if (strcmp(param->name, IFMARKINT) && |
881 | strcmp(param->name, OFMARKINT)) { | 881 | strcmp(param->name, OFMARKINT)) { |
@@ -903,8 +903,8 @@ static int iscsi_check_numerical_range_value(struct iscsi_param *param, char *va | |||
903 | if (iscsi_check_numerical_value(param, right_val_ptr) < 0) | 903 | if (iscsi_check_numerical_value(param, right_val_ptr) < 0) |
904 | return -1; | 904 | return -1; |
905 | 905 | ||
906 | left_val = simple_strtoul(left_val_ptr, &tmp_ptr, 0); | 906 | left_val = simple_strtoul(left_val_ptr, NULL, 0); |
907 | right_val = simple_strtoul(right_val_ptr, &tmp_ptr, 0); | 907 | right_val = simple_strtoul(right_val_ptr, NULL, 0); |
908 | *tilde_ptr = '~'; | 908 | *tilde_ptr = '~'; |
909 | 909 | ||
910 | if (right_val < left_val) { | 910 | if (right_val < left_val) { |
@@ -928,8 +928,7 @@ static int iscsi_check_numerical_range_value(struct iscsi_param *param, char *va | |||
928 | left_val_ptr = param->value; | 928 | left_val_ptr = param->value; |
929 | right_val_ptr = param->value + strlen(left_val_ptr) + 1; | 929 | right_val_ptr = param->value + strlen(left_val_ptr) + 1; |
930 | 930 | ||
931 | local_left_val = simple_strtoul(left_val_ptr, &tmp_ptr, 0); | 931 | local_left_val = simple_strtoul(left_val_ptr, NULL, 0); |
932 | local_right_val = simple_strtoul(right_val_ptr, &tmp_ptr, 0); | ||
933 | *tilde_ptr = '~'; | 932 | *tilde_ptr = '~'; |
934 | 933 | ||
935 | if (param->set_param) { | 934 | if (param->set_param) { |
@@ -1189,7 +1188,7 @@ static int iscsi_check_proposer_state(struct iscsi_param *param, char *value) | |||
1189 | if (IS_TYPE_NUMBER_RANGE(param)) { | 1188 | if (IS_TYPE_NUMBER_RANGE(param)) { |
1190 | u32 left_val = 0, right_val = 0, recieved_value = 0; | 1189 | u32 left_val = 0, right_val = 0, recieved_value = 0; |
1191 | char *left_val_ptr = NULL, *right_val_ptr = NULL; | 1190 | char *left_val_ptr = NULL, *right_val_ptr = NULL; |
1192 | char *tilde_ptr = NULL, *tmp_ptr = NULL; | 1191 | char *tilde_ptr = NULL; |
1193 | 1192 | ||
1194 | if (!strcmp(value, IRRELEVANT) || !strcmp(value, REJECT)) { | 1193 | if (!strcmp(value, IRRELEVANT) || !strcmp(value, REJECT)) { |
1195 | if (iscsi_update_param_value(param, value) < 0) | 1194 | if (iscsi_update_param_value(param, value) < 0) |
@@ -1213,9 +1212,9 @@ static int iscsi_check_proposer_state(struct iscsi_param *param, char *value) | |||
1213 | 1212 | ||
1214 | left_val_ptr = param->value; | 1213 | left_val_ptr = param->value; |
1215 | right_val_ptr = param->value + strlen(left_val_ptr) + 1; | 1214 | right_val_ptr = param->value + strlen(left_val_ptr) + 1; |
1216 | left_val = simple_strtoul(left_val_ptr, &tmp_ptr, 0); | 1215 | left_val = simple_strtoul(left_val_ptr, NULL, 0); |
1217 | right_val = simple_strtoul(right_val_ptr, &tmp_ptr, 0); | 1216 | right_val = simple_strtoul(right_val_ptr, NULL, 0); |
1218 | recieved_value = simple_strtoul(value, &tmp_ptr, 0); | 1217 | recieved_value = simple_strtoul(value, NULL, 0); |
1219 | 1218 | ||
1220 | *tilde_ptr = '~'; | 1219 | *tilde_ptr = '~'; |
1221 | 1220 | ||