mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-01-18 04:58:51 +02:00
Update *((Type *)lstGet()) pattern to *(Type *)lstGet().
This pattern has extra parens and was only used in a few places so replace it with the general *(Type *)lstGet() pattern.
This commit is contained in:
parent
fbee6ec170
commit
d935af5e59
@ -342,7 +342,7 @@ infoBackupData(const InfoBackup *this, unsigned int backupDataIdx)
|
||||
|
||||
ASSERT(this != NULL);
|
||||
|
||||
FUNCTION_LOG_RETURN(INFO_BACKUP_DATA, *((InfoBackupData *)lstGet(this->backup, backupDataIdx)));
|
||||
FUNCTION_LOG_RETURN(INFO_BACKUP_DATA, *(InfoBackupData *)lstGet(this->backup, backupDataIdx));
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************************/
|
||||
|
@ -412,7 +412,7 @@ infoPgData(const InfoPg *this, unsigned int pgDataIdx)
|
||||
|
||||
ASSERT(this != NULL);
|
||||
|
||||
FUNCTION_LOG_RETURN(INFO_PG_DATA, *((InfoPgData *)lstGet(this->history, pgDataIdx)));
|
||||
FUNCTION_LOG_RETURN(INFO_PG_DATA, *(InfoPgData *)lstGet(this->history, pgDataIdx));
|
||||
}
|
||||
|
||||
/**********************************************************************************************************************************/
|
||||
|
@ -92,7 +92,7 @@ testRun(void)
|
||||
|
||||
// Insert an int at the beginning
|
||||
int insertIdx = 0;
|
||||
TEST_RESULT_INT(*((int *)lstInsert(list, 0, &insertIdx)), 0, "insert item %d", insertIdx);
|
||||
TEST_RESULT_INT(*(int *)lstInsert(list, 0, &insertIdx), 0, "insert item %d", insertIdx);
|
||||
|
||||
// Check the size
|
||||
TEST_RESULT_INT(lstSize(list), 9, "list size");
|
||||
@ -143,24 +143,24 @@ testRun(void)
|
||||
|
||||
TEST_RESULT_PTR(lstSort(list, sortOrderNone), list, "list sort none");
|
||||
|
||||
TEST_RESULT_INT(*((int *)lstGet(list, 0)), 3, "sort value 0");
|
||||
TEST_RESULT_INT(*((int *)lstGet(list, 1)), 5, "sort value 1");
|
||||
TEST_RESULT_INT(*((int *)lstGet(list, 2)), 3, "sort value 2");
|
||||
TEST_RESULT_INT(*((int *)lstGet(list, 3)), 2, "sort value 3");
|
||||
TEST_RESULT_INT(*(int *)lstGet(list, 0), 3, "sort value 0");
|
||||
TEST_RESULT_INT(*(int *)lstGet(list, 1), 5, "sort value 1");
|
||||
TEST_RESULT_INT(*(int *)lstGet(list, 2), 3, "sort value 2");
|
||||
TEST_RESULT_INT(*(int *)lstGet(list, 3), 2, "sort value 3");
|
||||
|
||||
TEST_RESULT_PTR(lstSort(list, sortOrderAsc), list, "list sort asc");
|
||||
|
||||
TEST_RESULT_INT(*((int *)lstGet(list, 0)), 2, "sort value 0");
|
||||
TEST_RESULT_INT(*((int *)lstGet(list, 1)), 3, "sort value 1");
|
||||
TEST_RESULT_INT(*((int *)lstGet(list, 2)), 3, "sort value 2");
|
||||
TEST_RESULT_INT(*((int *)lstGet(list, 3)), 5, "sort value 3");
|
||||
TEST_RESULT_INT(*(int *)lstGet(list, 0), 2, "sort value 0");
|
||||
TEST_RESULT_INT(*(int *)lstGet(list, 1), 3, "sort value 1");
|
||||
TEST_RESULT_INT(*(int *)lstGet(list, 2), 3, "sort value 2");
|
||||
TEST_RESULT_INT(*(int *)lstGet(list, 3), 5, "sort value 3");
|
||||
|
||||
TEST_RESULT_PTR(lstSort(list, sortOrderDesc), list, "list sort desc");
|
||||
|
||||
TEST_RESULT_INT(*((int *)lstGet(list, 0)), 5, "sort value 0");
|
||||
TEST_RESULT_INT(*((int *)lstGet(list, 1)), 3, "sort value 1");
|
||||
TEST_RESULT_INT(*((int *)lstGet(list, 2)), 3, "sort value 2");
|
||||
TEST_RESULT_INT(*((int *)lstGet(list, 3)), 2, "sort value 3");
|
||||
TEST_RESULT_INT(*(int *)lstGet(list, 0), 5, "sort value 0");
|
||||
TEST_RESULT_INT(*(int *)lstGet(list, 1), 3, "sort value 1");
|
||||
TEST_RESULT_INT(*(int *)lstGet(list, 2), 3, "sort value 2");
|
||||
TEST_RESULT_INT(*(int *)lstGet(list, 3), 2, "sort value 3");
|
||||
}
|
||||
|
||||
// *****************************************************************************************************************************
|
||||
|
Loading…
x
Reference in New Issue
Block a user