T1030_unsolicited_data_overflow: remove unused variable
old_first_burst_len is set but never used - remove it. Also replace an
if (!ptr)
free(ptr)
with
free(ptr)
as the check is redundant.
Signed-off-by: Arne Redlich <arne.redlich@googlemail.com>
This commit is contained in:
@@ -47,7 +47,6 @@ int T1030_unsolicited_data_overflow(const char *initiator, const char *url, int
|
||||
int ret, lun;
|
||||
unsigned char *buf = NULL;
|
||||
struct iscsi_async_state test_state;
|
||||
uint32_t old_first_burst_len;
|
||||
|
||||
printf("1030_unsolicited_data_overflow:\n");
|
||||
printf("===============================\n");
|
||||
@@ -99,7 +98,7 @@ int T1030_unsolicited_data_overflow(const char *initiator, const char *url, int
|
||||
ret = 0;
|
||||
|
||||
iscsi->use_immediate_data = ISCSI_IMMEDIATE_DATA_YES;
|
||||
old_first_burst_len = iscsi->first_burst_length;
|
||||
|
||||
/* make first burst REAL big */
|
||||
iscsi->first_burst_length *= 16;
|
||||
buf = malloc(iscsi->first_burst_length);
|
||||
@@ -141,9 +140,8 @@ test2:
|
||||
printf("[OK]\n");
|
||||
|
||||
finished:
|
||||
if (buf) {
|
||||
free(buf);
|
||||
}
|
||||
|
||||
free(buf);
|
||||
iscsi_destroy_context(iscsi);
|
||||
iscsi_destroy_context(iscsi2);
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user