test-tool: Remove three casts

This patch does not change any functionality but removes the number
of casts in the test tool source code.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
This commit is contained in:
Bart Van Assche
2015-10-02 14:09:04 -07:00
committed by Ronnie Sahlberg
parent 608dbcba12
commit 393165d66a
2 changed files with 6 additions and 6 deletions

View File

@@ -991,11 +991,11 @@ static int connect_scsi_device(struct scsi_device *sdev, const char *initiatorna
static void free_scsi_device(struct scsi_device *sdev)
{
if (sdev->error_str) {
free(discard_const(sdev->error_str));
free(sdev->error_str);
sdev->error_str = NULL;
}
if (sdev->iscsi_url) {
free(discard_const(sdev->iscsi_url));
free(sdev->iscsi_url);
sdev->iscsi_url = NULL;
}
if (sdev->iscsi_ctx) {
@@ -1005,7 +1005,7 @@ static void free_scsi_device(struct scsi_device *sdev)
}
if (sdev->sgio_dev) {
free(discard_const(sdev->sgio_dev));
free(sdev->sgio_dev);
sdev->sgio_dev = NULL;
}
if (sdev->sgio_fd != -1) {