diff --git a/fsw/src/cf_cfdp.c b/fsw/src/cf_cfdp.c index 174773d3..1423aa04 100644 --- a/fsw/src/cf_cfdp.c +++ b/fsw/src/cf_cfdp.c @@ -218,7 +218,7 @@ static CF_Transaction_t *CF_CFDP_FindUnusedTransaction(CF_Channel_t *c) int q_index; /* initialized below in if */ const int chan_index = (c - CF_AppData.engine.channels); - clist_node n = c->qs[CF_QueueIdx_FREE]; + CF_CListNode_t *n = c->qs[CF_QueueIdx_FREE]; CF_Transaction_t *t = container_of(n, CF_Transaction_t, cl_node); CF_CList_Remove_Ex(c, CF_QueueIdx_FREE, &t->cl_node); @@ -298,7 +298,7 @@ static void CF_CFDP_FreeTransaction(CF_Transaction_t *t) ** \endreturns ** *************************************************************************/ -static int CF_CFDP_FindTransactionBySequenceNumber_(clist_node n, trans_seq_arg_t *context) +static int CF_CFDP_FindTransactionBySequenceNumber_(CF_CListNode_t *n, trans_seq_arg_t *context) { CF_Transaction_t *t = container_of(n, CF_Transaction_t, cl_node); int ret = 0; @@ -336,14 +336,14 @@ CF_Transaction_t *CF_CFDP_FindTransactionBySequenceNumber(CF_Channel_t *c, * * Let's put CF_QueueIdx_RX up front, because most RX packets will be file data PDUs */ trans_seq_arg_t ctx = {transaction_sequence_number, src_eid, NULL}; - clist_node ptrs[NUM_CLISTS] = {c->qs[CF_QueueIdx_RX], c->qs[CF_QueueIdx_PEND], c->qs[CF_QueueIdx_TXA], - c->qs[CF_QueueIdx_TXW]}; + CF_CListNode_t *ptrs[NUM_CLISTS] = {c->qs[CF_QueueIdx_RX], c->qs[CF_QueueIdx_PEND], c->qs[CF_QueueIdx_TXA], + c->qs[CF_QueueIdx_TXW]}; int i; CF_Transaction_t *ret = NULL; for (i = 0; i < NUM_CLISTS; ++i) { - CF_CList_Traverse(ptrs[i], (clist_fn_t)CF_CFDP_FindTransactionBySequenceNumber_, &ctx); + CF_CList_Traverse(ptrs[i], (CF_CListFn_t)CF_CFDP_FindTransactionBySequenceNumber_, &ctx); if (ctx.t) { ret = ctx.t; @@ -1488,7 +1488,7 @@ static void CF_CFDP_ReceiveMessage(CF_Channel_t *c) ** \endreturns ** *************************************************************************/ -static int CF_CFDP_CycleTx_(clist_node node, void *context) +static int CF_CFDP_CycleTx_(CF_CListNode_t *node, void *context) { CF_CFDP_CycleTx_args_t *args = (CF_CFDP_CycleTx_args_t *)context; CF_Transaction_t *t = container_of(node, CF_Transaction_t, cl_node); @@ -1577,9 +1577,9 @@ static void CF_CFDP_CycleTx(CF_Channel_t *c) ** \endreturns ** *************************************************************************/ -static int CF_CFDP_DoTick(clist_node node, void *context) +static int CF_CFDP_DoTick(CF_CListNode_t *node, void *context) { - int ret = CLIST_CONT; /* CLIST_CONT means don't tick one, keep looking for cur */ + int ret = CF_CLIST_CONT; /* CF_CLIST_CONT means don't tick one, keep looking for cur */ tick_args_t *args = (tick_args_t *)context; CF_Transaction_t *t = container_of(node, CF_Transaction_t, cl_node); if (!args->c->cur || (args->c->cur == t)) @@ -1596,7 +1596,7 @@ static int CF_CFDP_DoTick(clist_node node, void *context) * so there is no need to check it here */ if (args->c->cur) { - ret = CLIST_EXIT; + ret = CF_CLIST_EXIT; args->early_exit = 1; } } @@ -2234,14 +2234,14 @@ void CF_CFDP_CancelTransaction(CF_Transaction_t *t) ** \retcode Always 0 indicate list traversal should not exit early. \endcode ** \endreturns *************************************************************************/ -static int CF_CFDP_CloseFiles(clist_node n, void *context) +static int CF_CFDP_CloseFiles(CF_CListNode_t *n, void *context) { CF_Transaction_t *t = container_of(n, CF_Transaction_t, cl_node); if (OS_ObjectIdDefined(t->fd)) { CF_WrappedClose(t->fd); } - return CLIST_CONT; + return CF_CLIST_CONT; } /************************************************************************/ @@ -2260,7 +2260,7 @@ void CF_CFDP_DisableEngine(void) { CF_Channel_t *c = CF_AppData.engine.channels + i; /* first, close all active files */ - clist_node ptrs[] = {c->qs[CF_QueueIdx_RX], c->qs[CF_QueueIdx_TXA], c->qs[CF_QueueIdx_TXW]}; + CF_CListNode_t *ptrs[] = {c->qs[CF_QueueIdx_RX], c->qs[CF_QueueIdx_TXA], c->qs[CF_QueueIdx_TXW]}; for (j = 0; j < sizeof(ptrs) / sizeof(*ptrs); ++j) CF_CList_Traverse(ptrs[j], CF_CFDP_CloseFiles, NULL); diff --git a/fsw/src/cf_cfdp.h b/fsw/src/cf_cfdp.h index 2c9447fd..1863b75d 100644 --- a/fsw/src/cf_cfdp.h +++ b/fsw/src/cf_cfdp.h @@ -98,7 +98,7 @@ typedef enum typedef struct CF_History { CF_TxnFilenames_t fnames; - clist_node_t cl_node; + CF_CListNode_t cl_node; CF_Direction_t dir; CF_CFDP_ConditionCode_t cc; CF_EntityId_t src_eid; /* src_eid is always the source eid */ @@ -109,7 +109,7 @@ typedef struct CF_History typedef struct CF_ChunkWrapper { CF_ChunkList_t chunks; - clist_node_t cl_node; + CF_CListNode_t cl_node; } CF_ChunkWrapper_t; typedef struct CF_Playback @@ -236,7 +236,7 @@ typedef struct CF_Transaction uint8 chan_num; /* if ever more than one engine, this may need to change to pointer */ uint8 priority; - clist_node_t cl_node; + CF_CListNode_t cl_node; CF_Playback_t *p; /* NULL if transaction does not belong to a playback */ @@ -280,8 +280,8 @@ typedef enum typedef struct CF_Channel { - clist_node qs[CF_QueueIdx_NUM]; - clist_node cs[CF_Direction_NUM]; + CF_CListNode_t *qs[CF_QueueIdx_NUM]; + CF_CListNode_t *cs[CF_Direction_NUM]; CFE_SB_PipeId_t pipe; diff --git a/fsw/src/cf_clist.c b/fsw/src/cf_clist.c index d5d008c8..df333b3b 100644 --- a/fsw/src/cf_clist.c +++ b/fsw/src/cf_clist.c @@ -40,7 +40,7 @@ ** node must not be NULL. ** *************************************************************************/ -void CF_CList_InitNode(clist_node node) +void CF_CList_InitNode(CF_CListNode_t *node) { node->next = node; node->prev = node; @@ -53,7 +53,7 @@ void CF_CList_InitNode(clist_node node) ** head must not be NULL. node must not be NULL. ** *************************************************************************/ -void CF_CList_InsertFront(clist_node *head, clist_node node) +void CF_CList_InsertFront(CF_CListNode_t **head, CF_CListNode_t *node) { CF_Assert(head); CF_Assert(node); @@ -62,7 +62,7 @@ void CF_CList_InsertFront(clist_node *head, clist_node node) if (*head) { - clist_node_t *last = (*head)->prev; + CF_CListNode_t *last = (*head)->prev; node->next = *head; node->prev = last; @@ -80,7 +80,7 @@ void CF_CList_InsertFront(clist_node *head, clist_node node) ** head must not be NULL. node must not be NULL. ** *************************************************************************/ -void CF_CList_InsertBack(clist_node *head, clist_node node) +void CF_CList_InsertBack(CF_CListNode_t **head, CF_CListNode_t *node) { CF_Assert(head); CF_Assert(node); @@ -93,7 +93,7 @@ void CF_CList_InsertBack(clist_node *head, clist_node node) } else { - clist_node_t *last = (*head)->prev; + CF_CListNode_t *last = (*head)->prev; node->next = *head; (*head)->prev = node; @@ -113,9 +113,9 @@ void CF_CList_InsertBack(clist_node *head, clist_node node) ** \endreturns ** *************************************************************************/ -clist_node CF_CList_Pop(clist_node *head) +CF_CListNode_t *CF_CList_Pop(CF_CListNode_t **head) { - clist_node ret; + CF_CListNode_t *ret; CF_Assert(head); @@ -135,7 +135,7 @@ clist_node CF_CList_Pop(clist_node *head) ** head must not be NULL. node must not be NULL. ** *************************************************************************/ -void CF_CList_Remove(clist_node *head, clist_node node) +void CF_CList_Remove(CF_CListNode_t **head, CF_CListNode_t *node) { CF_Assert(head); CF_Assert(node); @@ -171,7 +171,7 @@ void CF_CList_Remove(clist_node *head, clist_node node) ** head must not be NULL. node must not be NULL. ** *************************************************************************/ -void CF_CList_InsertAfter(clist_node *head, clist_node start, clist_node after) +void CF_CList_InsertAfter(CF_CListNode_t **head, CF_CListNode_t *start, CF_CListNode_t *after) { /* calling insert_after with nothing to insert after (no head) makes no sense */ CF_Assert(head); @@ -193,11 +193,11 @@ void CF_CList_InsertAfter(clist_node *head, clist_node start, clist_node after) ** start may be NULL. fn must be a valid function. context may be NULL. ** *************************************************************************/ -void CF_CList_Traverse(clist_node start, clist_fn_t fn, void *context) +void CF_CList_Traverse(CF_CListNode_t *start, CF_CListFn_t fn, void *context) { - clist_node n = start; - clist_node nn; - int last = 0; + CF_CListNode_t *n = start; + CF_CListNode_t *nn; + int last = 0; if (n) { @@ -235,13 +235,13 @@ err_out:; ** end may be NULL. fn must be a valid function. context may be NULL. ** *************************************************************************/ -void CF_CList_Traverse_R(clist_node end, clist_fn_t fn, void *context) +void CF_CList_Traverse_R(CF_CListNode_t *end, CF_CListFn_t fn, void *context) { if (end) { - clist_node n = end->prev; - clist_node nn; - int last = 0; + CF_CListNode_t *n = end->prev; + CF_CListNode_t *nn; + int last = 0; if (n) { diff --git a/fsw/src/cf_clist.h b/fsw/src/cf_clist.h index 40adbf6f..d4406d81 100644 --- a/fsw/src/cf_clist.h +++ b/fsw/src/cf_clist.h @@ -24,44 +24,43 @@ ** *************************************************************************/ -#ifndef __CF_CLIST_H_ -#define __CF_CLIST_H_ +#ifndef CF_CLIST_H +#define CF_CLIST_H #include -#define CLIST_CONT 0 -#define CLIST_EXIT 1 +#define CF_CLIST_CONT 0 +#define CF_CLIST_EXIT 1 /* circular linked list */ -struct clist_node_t; -typedef struct clist_node_t +struct CF_CListNode { - struct clist_node_t *next; - struct clist_node_t *prev; -} clist_node_t; + struct CF_CListNode *next; + struct CF_CListNode *prev; +}; -typedef struct clist_node_t *clist_node; +typedef struct CF_CListNode CF_CListNode_t; /* good a place as any to put container_of for CF */ #define container_of(ptr, type, member) ((type *)((char *)(ptr) - (char *)offsetof(type, member))) -void CF_CList_InitNode(clist_node node); +void CF_CList_InitNode(CF_CListNode_t *node); /* in the functions, head is the list head */ -void CF_CList_InsertFront(clist_node *head, clist_node node); -void CF_CList_InsertBack(clist_node *head, clist_node node); -void CF_CList_Remove(clist_node *head, clist_node node); -clist_node CF_CList_Pop(clist_node *head); -void CF_CList_InsertAfter(clist_node *head, clist_node start, clist_node after); +void CF_CList_InsertFront(CF_CListNode_t **head, CF_CListNode_t *node); +void CF_CList_InsertBack(CF_CListNode_t **head, CF_CListNode_t *node); +void CF_CList_Remove(CF_CListNode_t **head, CF_CListNode_t *node); +CF_CListNode_t *CF_CList_Pop(CF_CListNode_t **head); +void CF_CList_InsertAfter(CF_CListNode_t **head, CF_CListNode_t *start, CF_CListNode_t *after); -/* NOTE: if clist_fn_t returns non-zero, the list traversal stops */ -typedef int (*clist_fn_t)(clist_node node, void *context); +/* NOTE: if CF_CListFn_t returns non-zero, the list traversal stops */ +typedef int (*CF_CListFn_t)(CF_CListNode_t *node, void *context); /* NOTE on traversal: it's ok to delete the current node, but do not delete * other nodes in the same list!! */ -void CF_CList_Traverse(clist_node start, clist_fn_t fn, void *context); +void CF_CList_Traverse(CF_CListNode_t *start, CF_CListFn_t fn, void *context); /* NOTE: traverse_R will work backwards from the parameter's prev, and end on param */ -void CF_CList_Traverse_R(clist_node end, clist_fn_t fn, void *context); +void CF_CList_Traverse_R(CF_CListNode_t *end, CF_CListFn_t fn, void *context); -#endif /* !__CF_CLIST_H_ */ +#endif /* !CF_CLIST_H */ diff --git a/fsw/src/cf_cmd.c b/fsw/src/cf_cmd.c index 48106313..5a9f1314 100644 --- a/fsw/src/cf_cmd.c +++ b/fsw/src/cf_cmd.c @@ -666,11 +666,11 @@ static void CF_CmdDisablePolldir(CFE_SB_Buffer_t *msg) ** n must not be NULL. c must not be NULL. ** *************************************************************************/ -static int CF_PurgeHistory(clist_node n, CF_Channel_t *c) +static int CF_PurgeHistory(CF_CListNode_t *n, CF_Channel_t *c) { CF_History_t *h = container_of(n, CF_History_t, cl_node); CF_CFDP_ResetHistory(c, h); /* ok to reset transaction since it's in PEND it hasn't started yet */ - return CLIST_CONT; + return CF_CLIST_CONT; } /************************************************************************/ @@ -680,11 +680,11 @@ static int CF_PurgeHistory(clist_node n, CF_Channel_t *c) ** n must not be NULL. ** *************************************************************************/ -static int CF_PurgeTransaction(clist_node n, void *ignored) +static int CF_PurgeTransaction(CF_CListNode_t *n, void *ignored) { CF_Transaction_t *t = container_of(n, CF_Transaction_t, cl_node); CF_CFDP_ResetTransaction(t, 0); - return CLIST_CONT; + return CF_CLIST_CONT; } /************************************************************************/ @@ -740,7 +740,7 @@ static int CF_DoPurgeQueue(uint8 chan_num, cf_cmd_unionargs_t *cmd) if (hist) { - CF_CList_Traverse(c->qs[CF_QueueIdx_HIST], (clist_fn_t)CF_PurgeHistory, c); + CF_CList_Traverse(c->qs[CF_QueueIdx_HIST], (CF_CListFn_t)CF_PurgeHistory, c); } return ret; diff --git a/fsw/src/cf_utils.c b/fsw/src/cf_utils.c index 22b13841..81f225b0 100644 --- a/fsw/src/cf_utils.c +++ b/fsw/src/cf_utils.c @@ -73,7 +73,7 @@ typedef struct ** \endreturns ** *************************************************************************/ -static int CF_TraverseHistory(clist_node n, trav_arg_t *context) +static int CF_TraverseHistory(CF_CListNode_t *n, trav_arg_t *context) { static const char *dstr[] = {"RX", "TX"}; int i; @@ -96,11 +96,11 @@ static int CF_TraverseHistory(clist_node n, trav_arg_t *context) context->result = 1; /* failed */ CFE_EVS_SendEvent(CF_EID_ERR_CMD_WHIST_WRITE, CFE_EVS_EventType_ERROR, "CF: writing queue file failed, expected 0x%08x got 0x%08x", len, ret); - return CLIST_EXIT; + return CF_CLIST_EXIT; } } - return CLIST_CONT; + return CF_CLIST_CONT; } /************************************************************************/ @@ -115,7 +115,7 @@ static int CF_TraverseHistory(clist_node n, trav_arg_t *context) ** \endreturns ** *************************************************************************/ -static int CF_TraverseTransactions(clist_node n, trav_arg_t *context) +static int CF_TraverseTransactions(CF_CListNode_t *n, trav_arg_t *context) { CF_Transaction_t *t = container_of(n, CF_Transaction_t, cl_node); @@ -127,10 +127,10 @@ static int CF_TraverseTransactions(clist_node n, trav_arg_t *context) /* ignore return value */ CF_TraverseHistory(&t->history->cl_node, context); if (context->result) { - return CLIST_EXIT; + return CF_CLIST_EXIT; } - return CLIST_CONT; + return CF_CLIST_CONT; } /************************************************************************/ @@ -147,7 +147,7 @@ static int CF_TraverseTransactions(clist_node n, trav_arg_t *context) int32 CF_WriteQueueDataToFile(int32 fd, CF_Channel_t *c, CF_QueueIdx_t q) { trav_arg_t arg = {fd, 0, 0}; - CF_CList_Traverse(c->qs[q], (clist_fn_t)CF_TraverseTransactions, &arg); + CF_CList_Traverse(c->qs[q], (CF_CListFn_t)CF_TraverseTransactions, &arg); return arg.result; } @@ -165,7 +165,7 @@ int32 CF_WriteQueueDataToFile(int32 fd, CF_Channel_t *c, CF_QueueIdx_t q) int32 CF_WriteHistoryQueueDataToFile(int32 fd, CF_Channel_t *c, CF_Direction_t dir) { trav_arg_t arg = {fd, 0, 0}; - CF_CList_Traverse(c->qs[CF_QueueIdx_HIST], (clist_fn_t)CF_TraverseHistory, &arg); + CF_CList_Traverse(c->qs[CF_QueueIdx_HIST], (CF_CListFn_t)CF_TraverseHistory, &arg); return arg.result; } @@ -184,7 +184,7 @@ int32 CF_WriteHistoryQueueDataToFile(int32 fd, CF_Channel_t *c, CF_Direction_t d ** \endreturns ** *************************************************************************/ -static int CF_PrioSearch(clist_node node, void *context) +static int CF_PrioSearch(CF_CListNode_t *node, void *context) { CF_Transaction_t *t = container_of(node, CF_Transaction_t, cl_node); priority_arg_t *p = (priority_arg_t *)context; @@ -196,10 +196,10 @@ static int CF_PrioSearch(clist_node node, void *context) * the current transaction's prio is less than desired (higher) */ p->t = t; - return CLIST_EXIT; + return CF_CLIST_EXIT; } - return CLIST_CONT; + return CF_CLIST_CONT; } /************************************************************************/ @@ -266,12 +266,12 @@ void CF_InsertSortPrio(CF_Transaction_t *t, CF_QueueIdx_t q) ** \endreturns ** *************************************************************************/ -static int CF_TraverseAllTransactions_(clist_node n, traverse_all_args_t *args) +static int CF_TraverseAllTransactions_(CF_CListNode_t *n, traverse_all_args_t *args) { CF_Transaction_t *t = container_of(n, CF_Transaction_t, cl_node); args->fn(t, args->context); ++args->counter; - return CLIST_CONT; + return CF_CLIST_CONT; } /************************************************************************/ @@ -290,7 +290,7 @@ int CF_TraverseAllTransactions(CF_Channel_t *c, CF_TraverseAllTransactions_fn_t traverse_all_args_t args = {fn, context, 0}; CF_QueueIdx_t index; for (index = CF_QueueIdx_PEND; index <= CF_QueueIdx_RX; ++index) - CF_CList_Traverse(c->qs[index], (clist_fn_t)CF_TraverseAllTransactions_, &args); + CF_CList_Traverse(c->qs[index], (CF_CListFn_t)CF_TraverseAllTransactions_, &args); return args.counter; } diff --git a/fsw/src/cf_utils.h b/fsw/src/cf_utils.h index b8d7ad64..c4fe0e54 100644 --- a/fsw/src/cf_utils.h +++ b/fsw/src/cf_utils.h @@ -58,20 +58,21 @@ static inline void cf_move_transaction(CF_Transaction_t *t, CF_QueueIdx_t q) ++CF_AppData.hk.channel_hk[t->chan_num].q_size[t->flags.com.q_index]; } -static inline void CF_CList_Remove_Ex(CF_Channel_t *c, CF_QueueIdx_t index, clist_node node) +static inline void CF_CList_Remove_Ex(CF_Channel_t *c, CF_QueueIdx_t index, CF_CListNode_t *node) { CF_CList_Remove(&c->qs[index], node); CF_Assert(CF_AppData.hk.channel_hk[c - CF_AppData.engine.channels].q_size[index]); /* sanity check */ --CF_AppData.hk.channel_hk[c - CF_AppData.engine.channels].q_size[index]; } -static inline void CF_CList_InsertAfter_Ex(CF_Channel_t *c, CF_QueueIdx_t index, clist_node start, clist_node after) +static inline void CF_CList_InsertAfter_Ex(CF_Channel_t *c, CF_QueueIdx_t index, CF_CListNode_t *start, + CF_CListNode_t *after) { CF_CList_InsertAfter(&c->qs[index], start, after); ++CF_AppData.hk.channel_hk[c - CF_AppData.engine.channels].q_size[index]; } -static inline void CF_CList_InsertBack_Ex(CF_Channel_t *c, CF_QueueIdx_t index, clist_node node) +static inline void CF_CList_InsertBack_Ex(CF_Channel_t *c, CF_QueueIdx_t index, CF_CListNode_t *node) { CF_CList_InsertBack(&c->qs[index], node); ++CF_AppData.hk.channel_hk[c - CF_AppData.engine.channels].q_size[index]; diff --git a/unit-test/cf_cfdp_tests.c b/unit-test/cf_cfdp_tests.c index 11fbb241..baddf70f 100644 --- a/unit-test/cf_cfdp_tests.c +++ b/unit-test/cf_cfdp_tests.c @@ -24,7 +24,7 @@ int32 Stub_FGV(uint8 source, CF_FIELD_FIELD name); void cf_dequeue_transaction(CF_Transaction_t *t); #undef CF_CList_InsertBack_Ex #define CF_CList_InsertBack_Ex Stub_CF_CList_InsertBack_Ex -void Stub_CF_CList_InsertBack_Ex(CF_Channel_t *c, CF_QueueIdx_t index, clist_node node); +void Stub_CF_CList_InsertBack_Ex(CF_Channel_t *c, CF_QueueIdx_t index, CF_CListNode_t *node); #include "cf_cfdp.c" #include "cf_cfdp_pdu.h" @@ -295,11 +295,11 @@ void handler_CF_CList_InsertBack_Ex_Record_indexes(void *UserObj, UT_EntryKey_t *(((CF_QueueIdx_t *)UserObj) + (UT_GetStubCount(FuncKey) - 1)) = index; } -void Stub_CF_CList_InsertBack_Ex(CF_Channel_t *c, CF_QueueIdx_t index, clist_node node) +void Stub_CF_CList_InsertBack_Ex(CF_Channel_t *c, CF_QueueIdx_t index, CF_CListNode_t *node) { UT_GenStub_AddParam(Stub_CF_CList_InsertBack_Ex, CF_Channel_t *, c); UT_GenStub_AddParam(Stub_CF_CList_InsertBack_Ex, CF_QueueIdx_t, index); - UT_GenStub_AddParam(Stub_CF_CList_InsertBack_Ex, clist_node, node); + UT_GenStub_AddParam(Stub_CF_CList_InsertBack_Ex, CF_CListNode_t *, node); UT_GenStub_Execute(Stub_CF_CList_InsertBack_Ex, Basic, NULL); } @@ -899,11 +899,11 @@ void Test_CF_CFDP_FindUnusedChunks_Success(void) CF_ChunkWrapper_t dummy_expected_result; CF_ChunkWrapper_t *expected_result = &dummy_expected_result; CF_ChunkWrapper_t *local_result; - clist_node forced_return_CF_CList_Pop; + CF_CListNode_t *forced_return_CF_CList_Pop; CF_CList_Pop_context_t context_CF_CList_Pop; forced_return_CF_CList_Pop = &expected_result->cl_node; - arg_c->cs[arg_dir] = (clist_node)&forced_return_CF_CList_Pop; + arg_c->cs[arg_dir] = (CF_CListNode_t *)&forced_return_CF_CList_Pop; context_CF_CList_Pop.forced_return = forced_return_CF_CList_Pop; UT_SetDataBuffer(UT_KEY(CF_CList_Pop), &context_CF_CList_Pop, sizeof(context_CF_CList_Pop), false); @@ -984,7 +984,7 @@ void Test_CF_CFDP_FindUnusedTransaction_WhenNoFreeHistoryReturnExpected_t(void) { /* Arrange */ CF_Channel_t *arg_c; - clist_node dummy_n; + CF_CListNode_t *dummy_n; CF_History_t dummy_history; CF_Transaction_t dummy_expected_t; uint8 dummy_channel = Any_uint8_LessThan(CF_NUM_CHANNELS); @@ -1018,7 +1018,7 @@ void Test_CF_CFDP_FindUnusedTransaction_WhenFreeHistoryReturnExpected_t(void) { /* Arrange */ CF_Channel_t *arg_c; - clist_node dummy_n; + CF_CListNode_t *dummy_n; CF_History_t dummy_history; CF_Transaction_t dummy_expected_t; uint8 dummy_channel = Any_uint8_LessThan(CF_NUM_CHANNELS); @@ -1112,7 +1112,7 @@ void Test_CF_CFDP_FreeTransaction_Call_CF_CList_InitNode_And_CF_CList_InsertBack CF_Transaction_t dummy_t; CF_Transaction_t *arg_t = &dummy_t; uint8 dummy_chan_num = Any_uint8_LessThan(CF_NUM_CHANNELS); - clist_node context_CF_CList_InitNode; + CF_CListNode_t *context_CF_CList_InitNode; arg_t->chan_num = dummy_chan_num; @@ -1147,7 +1147,7 @@ void Test_CF_CFDP_FreeTransaction_Call_CF_CList_InitNode_And_CF_CList_InsertBack void Test_CF_CFDP_FindTransactionBySequenceNumber__When_context_src_eid_NotEq_history_src_eid_DoNotFindTransaction(void) { /* Arrange */ - clist_node arg_n; + CF_CListNode_t *arg_n; trans_seq_arg_t dummy_context; trans_seq_arg_t *arg_context = &dummy_context; CF_Transaction_t dummy_t; @@ -1176,7 +1176,7 @@ void Test_CF_CFDP_FindTransactionBySequenceNumber__When_context_transaction_sequ void) { /* Arrange */ - clist_node arg_n; + CF_CListNode_t *arg_n; trans_seq_arg_t dummy_context; trans_seq_arg_t *arg_context = &dummy_context; CF_Transaction_t dummy_t; @@ -1206,7 +1206,7 @@ void Test_CF_CFDP_FindTransactionBySequenceNumber__When_history_And_context_Matc void) { /* Arrange */ - clist_node arg_n; + CF_CListNode_t *arg_n; trans_seq_arg_t dummy_context; trans_seq_arg_t *arg_context = &dummy_context; CF_Transaction_t dummy_t; @@ -1246,7 +1246,7 @@ void Test_CF_CFDP_FindTransactionBySequenceNumber_DoNotFindTransaction(void) CF_Channel_t *arg_c = &dummy_c; CF_TransactionSeq_t arg_transaction_sequence_number = Any_uint32(); CF_EntityId_t arg_src_eid = Any_uint8(); - clist_node expected_ptrs[NUM_CLISTS]; + CF_CListNode_t *expected_ptrs[NUM_CLISTS]; CF_Transaction_t *local_result; int i = 0; @@ -1277,8 +1277,8 @@ void Test_CF_CFDP_FindTransactionBySequenceNumber_DoNotFindTransaction(void) for (i = 0; i < NUM_CLISTS; ++i) { UtAssert_ADDRESS_EQ(context_CF_CList_Traverse[i].start, expected_ptrs[i]); - UtAssert_True(context_CF_CList_Traverse[i].fn == (clist_fn_t)CF_CFDP_FindTransactionBySequenceNumber_, - "context_CF_CList_Traverse[i].fn == (clist_fn_t)CF_CFDP_FindTransactionBySequenceNumber_"); + UtAssert_True(context_CF_CList_Traverse[i].fn == (CF_CListFn_t)CF_CFDP_FindTransactionBySequenceNumber_, + "context_CF_CList_Traverse[i].fn == (CF_CListFn_t )CF_CFDP_FindTransactionBySequenceNumber_"); UtAssert_True( context_CF_CList_Traverse[i].context_transaction_sequence_number == arg_transaction_sequence_number, "CF_CList_Traverse received context.transaction_sequence_number %u and should be %u " @@ -1297,7 +1297,7 @@ void Test_CF_CFDP_FindTransactionBySequenceNumber_FindTransactionOnLastClist(voi CF_Channel_t *arg_c = &dummy_c; CF_TransactionSeq_t arg_transaction_sequence_number = Any_uint32(); CF_EntityId_t arg_src_eid = Any_uint8(); - clist_node expected_ptrs[NUM_CLISTS]; + CF_CListNode_t *expected_ptrs[NUM_CLISTS]; CF_Transaction_t dummy_result; CF_Transaction_t *expected_result = &dummy_result; CF_Transaction_t *local_result; @@ -1332,8 +1332,8 @@ void Test_CF_CFDP_FindTransactionBySequenceNumber_FindTransactionOnLastClist(voi for (i = 0; i < NUM_CLISTS; ++i) { UtAssert_ADDRESS_EQ(context_CF_CList_Traverse[i].start, expected_ptrs[i]); - UtAssert_True(context_CF_CList_Traverse[i].fn == (clist_fn_t)CF_CFDP_FindTransactionBySequenceNumber_, - "context_CF_CList_Traverse[i].fn == (clist_fn_t)CF_CFDP_FindTransactionBySequenceNumber_"); + UtAssert_True(context_CF_CList_Traverse[i].fn == (CF_CListFn_t)CF_CFDP_FindTransactionBySequenceNumber_, + "context_CF_CList_Traverse[i].fn == (CF_CListFn_t )CF_CFDP_FindTransactionBySequenceNumber_"); UtAssert_True( context_CF_CList_Traverse[i].context_transaction_sequence_number == arg_transaction_sequence_number, "CF_CList_Traverse received context.transaction_sequence_number %u and should be %u " @@ -4006,14 +4006,14 @@ void Test_CF_CFDP_RecvIdle_CheckOf_PDU_HDR_FLAGS_TYPE_And_PDU_HDR_FLAGS_MODE_Are CF_Channel_t *ptr_c = &dummy_c; CF_ChunkWrapper_t dummy_CF_CFDP_FindUnusedChunks_result; CF_ChunkWrapper_t *forced_CF_CFDP_FindUnusedChunks_result = &dummy_CF_CFDP_FindUnusedChunks_result; - clist_node_t dummy_c_list_node; - clist_node forced_return_CF_CList_Pop = &dummy_c_list_node; + CF_CListNode_t dummy_c_list_node; + CF_CListNode_t *forced_return_CF_CList_Pop = &dummy_c_list_node; CF_CList_Pop_context_t context_CF_CList_Pop; CF_AppData.engine.channels[arg_t->chan_num].cs[CF_Direction_RX] = forced_return_CF_CList_Pop; forced_return_CF_CList_Pop = &forced_CF_CFDP_FindUnusedChunks_result->cl_node; - ptr_c->cs[CF_Direction_RX] = (clist_node)&forced_return_CF_CList_Pop; + ptr_c->cs[CF_Direction_RX] = (CF_CListNode_t *)&forced_return_CF_CList_Pop; context_CF_CList_Pop.forced_return = forced_return_CF_CList_Pop; UT_SetDataBuffer(UT_KEY(CF_CList_Pop), &context_CF_CList_Pop, sizeof(context_CF_CList_Pop), false); @@ -4057,14 +4057,14 @@ void Test_CF_CFDP_RecvIdle_CheckOf_PDU_HDR_FLAGS_TYPE_Is_true_And_PDU_HDR_FLAGS_ CF_Channel_t *ptr_c = &dummy_c; CF_ChunkWrapper_t dummy_CF_CFDP_FindUnusedChunks_result; CF_ChunkWrapper_t *forced_CF_CFDP_FindUnusedChunks_result = &dummy_CF_CFDP_FindUnusedChunks_result; - clist_node_t dummy_c_list_node; - clist_node forced_return_CF_CList_Pop = &dummy_c_list_node; + CF_CListNode_t dummy_c_list_node; + CF_CListNode_t *forced_return_CF_CList_Pop = &dummy_c_list_node; CF_CList_Pop_context_t context_CF_CList_Pop; CF_AppData.engine.channels[arg_t->chan_num].cs[CF_Direction_RX] = forced_return_CF_CList_Pop; forced_return_CF_CList_Pop = &forced_CF_CFDP_FindUnusedChunks_result->cl_node; - ptr_c->cs[CF_Direction_RX] = (clist_node)&forced_return_CF_CList_Pop; + ptr_c->cs[CF_Direction_RX] = (CF_CListNode_t *)&forced_return_CF_CList_Pop; context_CF_CList_Pop.forced_return = forced_return_CF_CList_Pop; UT_SetDataBuffer(UT_KEY(CF_CList_Pop), &context_CF_CList_Pop, sizeof(context_CF_CList_Pop), false); @@ -4121,14 +4121,14 @@ void Test_CF_CFDP_RecvIdle_CheckOf_PDU_HDR_FLAGS_TYPE_Is_true_And_PDU_HDR_FLAGS_ CF_Channel_t *ptr_c = &dummy_c; CF_ChunkWrapper_t dummy_CF_CFDP_FindUnusedChunks_result; CF_ChunkWrapper_t *forced_CF_CFDP_FindUnusedChunks_result = &dummy_CF_CFDP_FindUnusedChunks_result; - clist_node_t dummy_c_list_node; - clist_node forced_return_CF_CList_Pop = &dummy_c_list_node; + CF_CListNode_t dummy_c_list_node; + CF_CListNode_t *forced_return_CF_CList_Pop = &dummy_c_list_node; CF_CList_Pop_context_t context_CF_CList_Pop; CF_AppData.engine.channels[arg_t->chan_num].cs[CF_Direction_RX] = forced_return_CF_CList_Pop; forced_return_CF_CList_Pop = &forced_CF_CFDP_FindUnusedChunks_result->cl_node; - ptr_c->cs[CF_Direction_RX] = (clist_node)&forced_return_CF_CList_Pop; + ptr_c->cs[CF_Direction_RX] = (CF_CListNode_t *)&forced_return_CF_CList_Pop; context_CF_CList_Pop.forced_return = forced_return_CF_CList_Pop; UT_SetDataBuffer(UT_KEY(CF_CList_Pop), &context_CF_CList_Pop, sizeof(context_CF_CList_Pop), false); @@ -4206,14 +4206,14 @@ void Test_CF_CFDP_RecvIdle_CheckOf_PDU_HDR_FLAGS_TYPE_Returns_false_But_fdh_dire CF_Channel_t *ptr_c = &dummy_c; CF_ChunkWrapper_t dummy_CF_CFDP_FindUnusedChunks_result; CF_ChunkWrapper_t *forced_CF_CFDP_FindUnusedChunks_result = &dummy_CF_CFDP_FindUnusedChunks_result; - clist_node_t dummy_c_list_node; - clist_node forced_return_CF_CList_Pop = &dummy_c_list_node; + CF_CListNode_t dummy_c_list_node; + CF_CListNode_t *forced_return_CF_CList_Pop = &dummy_c_list_node; CF_CList_Pop_context_t context_CF_CList_Pop; CF_AppData.engine.channels[arg_t->chan_num].cs[CF_Direction_RX] = forced_return_CF_CList_Pop; forced_return_CF_CList_Pop = &forced_CF_CFDP_FindUnusedChunks_result->cl_node; - ptr_c->cs[CF_Direction_RX] = (clist_node)&forced_return_CF_CList_Pop; + ptr_c->cs[CF_Direction_RX] = (CF_CListNode_t *)&forced_return_CF_CList_Pop; context_CF_CList_Pop.forced_return = forced_return_CF_CList_Pop; UT_SetDataBuffer(UT_KEY(CF_CList_Pop), &context_CF_CList_Pop, sizeof(context_CF_CList_Pop), false); @@ -4282,14 +4282,14 @@ void Test_CF_CFDP_RecvIdle_CheckOf_PDU_HDR_FLAGS_TYPE_Returns_false_And_fdh_dire CF_Channel_t *ptr_c = &dummy_c; CF_ChunkWrapper_t dummy_CF_CFDP_FindUnusedChunks_result; CF_ChunkWrapper_t *forced_CF_CFDP_FindUnusedChunks_result = &dummy_CF_CFDP_FindUnusedChunks_result; - clist_node_t dummy_c_list_node; - clist_node forced_return_CF_CList_Pop = &dummy_c_list_node; + CF_CListNode_t dummy_c_list_node; + CF_CListNode_t *forced_return_CF_CList_Pop = &dummy_c_list_node; CF_CList_Pop_context_t context_CF_CList_Pop; CF_AppData.engine.channels[arg_t->chan_num].cs[CF_Direction_RX] = forced_return_CF_CList_Pop; forced_return_CF_CList_Pop = &forced_CF_CFDP_FindUnusedChunks_result->cl_node; - ptr_c->cs[CF_Direction_RX] = (clist_node)&forced_return_CF_CList_Pop; + ptr_c->cs[CF_Direction_RX] = (CF_CListNode_t *)&forced_return_CF_CList_Pop; context_CF_CList_Pop.forced_return = forced_return_CF_CList_Pop; UT_SetDataBuffer(UT_KEY(CF_CList_Pop), &context_CF_CList_Pop, sizeof(context_CF_CList_Pop), false); @@ -4372,14 +4372,14 @@ void Test_CF_CFDP_RecvIdle_CheckOf_PDU_HDR_FLAGS_TYPE_Returns_false_And_fdh_dire CF_Channel_t *ptr_c = &dummy_c; CF_ChunkWrapper_t dummy_CF_CFDP_FindUnusedChunks_result; CF_ChunkWrapper_t *forced_CF_CFDP_FindUnusedChunks_result = &dummy_CF_CFDP_FindUnusedChunks_result; - clist_node_t dummy_c_list_node; - clist_node forced_return_CF_CList_Pop = &dummy_c_list_node; + CF_CListNode_t dummy_c_list_node; + CF_CListNode_t *forced_return_CF_CList_Pop = &dummy_c_list_node; CF_CList_Pop_context_t context_CF_CList_Pop; CF_AppData.engine.channels[arg_t->chan_num].cs[CF_Direction_RX] = forced_return_CF_CList_Pop; forced_return_CF_CList_Pop = &forced_CF_CFDP_FindUnusedChunks_result->cl_node; - ptr_c->cs[CF_Direction_RX] = (clist_node)&forced_return_CF_CList_Pop; + ptr_c->cs[CF_Direction_RX] = (CF_CListNode_t *)&forced_return_CF_CList_Pop; context_CF_CList_Pop.forced_return = forced_return_CF_CList_Pop; UT_SetDataBuffer(UT_KEY(CF_CList_Pop), &context_CF_CList_Pop, sizeof(context_CF_CList_Pop), false); @@ -4458,14 +4458,14 @@ void Test_CF_CFDP_RecvIdle_CheckOf_PDU_HDR_FLAGS_TYPE_Returns_false_And_fdh_dire CF_Channel_t *ptr_c = &dummy_c; CF_ChunkWrapper_t dummy_CF_CFDP_FindUnusedChunks_result; CF_ChunkWrapper_t *forced_CF_CFDP_FindUnusedChunks_result = &dummy_CF_CFDP_FindUnusedChunks_result; - clist_node_t dummy_c_list_node; - clist_node forced_return_CF_CList_Pop = &dummy_c_list_node; + CF_CListNode_t dummy_c_list_node; + CF_CListNode_t *forced_return_CF_CList_Pop = &dummy_c_list_node; CF_CList_Pop_context_t context_CF_CList_Pop; CF_AppData.engine.channels[arg_t->chan_num].cs[CF_Direction_RX] = forced_return_CF_CList_Pop; forced_return_CF_CList_Pop = &forced_CF_CFDP_FindUnusedChunks_result->cl_node; - ptr_c->cs[CF_Direction_RX] = (clist_node)&forced_return_CF_CList_Pop; + ptr_c->cs[CF_Direction_RX] = (CF_CListNode_t *)&forced_return_CF_CList_Pop; context_CF_CList_Pop.forced_return = forced_return_CF_CList_Pop; UT_SetDataBuffer(UT_KEY(CF_CList_Pop), &context_CF_CList_Pop, sizeof(context_CF_CList_Pop), false); @@ -5904,14 +5904,14 @@ void Test_2CF_CFDP_ReceiveMessage_CallTo_src_IsNotEqTo_config_table_local_eid_Bu } /* Arrange for CF_CFDP_FindUnusedChunks */ - clist_node_t dummy_node; + CF_CListNode_t dummy_node; (&CF_AppData.engine.channels[dummy_t.chan_num])->cs[CF_Direction_RX] = &dummy_node; UT_SetDefaultReturnValue(UT_KEY(OS_ObjectIdDefined), true); /* Arrange for CF_CFDP_FindUnusedTransaction */ - clist_node_t dummy_cf_q_hist; + CF_CListNode_t dummy_cf_q_hist; CF_AppData.hk.channel_hk[arg_c - CF_AppData.engine.channels].q_size[CF_QueueIdx_FREE] = 1; CF_AppData.hk.channel_hk[arg_c - CF_AppData.engine.channels].q_size[CF_QueueIdx_HIST] = 1; @@ -5953,7 +5953,7 @@ void Test_CF_CFDP_CycleTx__Given_node_TransactionContainer_t_flags_all_suspended { /* Arrange */ CF_Transaction_t dummy_t; - clist_node arg_clist_node = &dummy_t.cl_node; + CF_CListNode_t *arg_clist_node = &dummy_t.cl_node; CF_CFDP_CycleTx_args_t dummy_args; void *arg_context = (void *)&dummy_args; int local_result; @@ -5971,7 +5971,7 @@ void Test_CF_CFDP_CycleTx__AssertsBecauseGiven_node_TransactionContainer_t_flags { // /* Arrange */ // CF_Transaction_t dummy_t; - // clist_node arg_clist_node = &dummy_t.cl_node; + // CF_CListNode_t * arg_clist_node = &dummy_t.cl_node; // CF_CFDP_CycleTx_args_t dummy_args; // void* arg_context = (void*)&dummy_args; // int local_result; @@ -5994,7 +5994,7 @@ void Test_CF_CFDP_CycleTx__Given_node_TransactionContainer_t_flags_all_q_index_I CF_Channel_t dummy_c; CF_Transaction_t dummy_cur; CF_Transaction_t dummy_t; - clist_node arg_clist_node = &dummy_t.cl_node; + CF_CListNode_t *arg_clist_node = &dummy_t.cl_node; CF_CFDP_CycleTx_args_t dummy_args; void *arg_context = (void *)&dummy_args; int local_result; @@ -6026,7 +6026,7 @@ void Test_CF_CFDP_CycleTx__Given_node_TransactionContainer_t_flags_all_q_index_I /* Arrange */ CF_Channel_t dummy_c; CF_Transaction_t dummy_t; - clist_node arg_clist_node = &dummy_t.cl_node; + CF_CListNode_t *arg_clist_node = &dummy_t.cl_node; CF_CFDP_CycleTx_args_t dummy_args; void *arg_context = (void *)&dummy_args; int local_result; @@ -6066,7 +6066,7 @@ void Test_CF_CFDP_CycleTx__Given_node_TransactionContainer_t_flags_all_q_index_I /* Arrange */ CF_Channel_t dummy_c; CF_Transaction_t dummy_t; - clist_node arg_clist_node = &dummy_t.cl_node; + CF_CListNode_t *arg_clist_node = &dummy_t.cl_node; CF_CFDP_CycleTx_args_t dummy_args; void *arg_context = (void *)&dummy_args; int local_result; @@ -6108,7 +6108,7 @@ void Test_CF_CFDP_CycleTx_Given_node_TransactionContainer_t_flags_all_q_index_Is /* Arrange */ CF_Channel_t dummy_c; CF_Transaction_t dummy_t; - clist_node arg_clist_node = &dummy_t.cl_node; + CF_CListNode_t *arg_clist_node = &dummy_t.cl_node; CF_CFDP_CycleTx_args_t dummy_args; void *arg_context = (void *)&dummy_args; int local_result; @@ -6303,7 +6303,7 @@ void Test_CF_CFDP_DoTick_Given_context_Determined_args_c_cur_IsNotNull_And_NotEq CF_Transaction_t dummy_cur; CF_Channel_t dummy_c; CF_Transaction_t dummy_t; - clist_node arg_node = &dummy_t.cl_node; + CF_CListNode_t *arg_node = &dummy_t.cl_node; tick_args_t dummy_args; void *arg_context = (void *)&dummy_args; int local_result; @@ -6315,8 +6315,8 @@ void Test_CF_CFDP_DoTick_Given_context_Determined_args_c_cur_IsNotNull_And_NotEq local_result = CF_CFDP_DoTick(arg_node, arg_context); /* Assert */ - UtAssert_True(local_result == CLIST_CONT, "CF_CFDP_DoTick returned %d and should be %d (CLIST_CONT)", local_result, - CLIST_CONT); + UtAssert_True(local_result == CF_CLIST_CONT, "CF_CFDP_DoTick returned %d and should be %d (CF_CLIST_CONT)", + local_result, CF_CLIST_CONT); } /* end Test_CF_CFDP_DoTick_Given_context_Determined_args_c_cur_IsNotNull_And_NotEqTo_t_Return_CLIST_CONT */ void Test_CF_CFDP_DoTick_Given_context_Determined_args_c_cur_IsNull_But_t_flags_all_suspended_IsTrueReturn_CLIST_CONT( @@ -6325,7 +6325,7 @@ void Test_CF_CFDP_DoTick_Given_context_Determined_args_c_cur_IsNull_But_t_flags_ /* Arrange */ CF_Channel_t dummy_c; CF_Transaction_t dummy_t; - clist_node arg_node = &dummy_t.cl_node; + CF_CListNode_t *arg_node = &dummy_t.cl_node; tick_args_t dummy_args; void *arg_context = (void *)&dummy_args; int local_result; @@ -6339,8 +6339,8 @@ void Test_CF_CFDP_DoTick_Given_context_Determined_args_c_cur_IsNull_But_t_flags_ local_result = CF_CFDP_DoTick(arg_node, arg_context); /* Assert */ - UtAssert_True(local_result == CLIST_CONT, "CF_CFDP_DoTick returned %d and should be %d (CLIST_CONT)", local_result, - CLIST_CONT); + UtAssert_True(local_result == CF_CLIST_CONT, "CF_CFDP_DoTick returned %d and should be %d (CF_CLIST_CONT)", + local_result, CF_CLIST_CONT); UtAssert_NULL(dummy_args.c->cur); } /* end Test_CF_CFDP_DoTick_Given_context_Determined_args_c_cur_IsNull_But_t_flags_all_suspended_IsTrueReturn_CLIST_CONT */ @@ -6351,7 +6351,7 @@ void Test_CF_CFDP_DoTick_Given_context_Determined_args_c_cur_Is_t_But_t_flags_al /* Arrange */ CF_Channel_t dummy_c; CF_Transaction_t dummy_t; - clist_node arg_node = &dummy_t.cl_node; + CF_CListNode_t *arg_node = &dummy_t.cl_node; tick_args_t dummy_args; void *arg_context = (void *)&dummy_args; int local_result; @@ -6365,8 +6365,8 @@ void Test_CF_CFDP_DoTick_Given_context_Determined_args_c_cur_Is_t_But_t_flags_al local_result = CF_CFDP_DoTick(arg_node, arg_context); /* Assert */ - UtAssert_True(local_result == CLIST_CONT, "CF_CFDP_DoTick returned %d and should be %d (CLIST_CONT)", local_result, - CLIST_CONT); + UtAssert_True(local_result == CF_CLIST_CONT, "CF_CFDP_DoTick returned %d and should be %d (CF_CLIST_CONT)", + local_result, CF_CLIST_CONT); UtAssert_NULL(dummy_args.c->cur); } /* end Test_CF_CFDP_DoTick_Given_context_Determined_args_c_cur_Is_t_But_t_flags_all_suspended_IsTrueReturn_CLIST_CONT */ @@ -6377,7 +6377,7 @@ void Test_CF_CFDP_DoTick_Given_context_Determined_args_c_cur_Is_t_And_t_flags_al /* Arrange */ CF_Channel_t dummy_c; CF_Transaction_t dummy_t; - clist_node arg_node = &dummy_t.cl_node; + CF_CListNode_t *arg_node = &dummy_t.cl_node; tick_args_t dummy_args; void *arg_context = (void *)&dummy_args; int initial_early_exit = Any_int_Except(1); @@ -6396,8 +6396,8 @@ void Test_CF_CFDP_DoTick_Given_context_Determined_args_c_cur_Is_t_And_t_flags_al local_result = CF_CFDP_DoTick(arg_node, arg_context); /* Assert */ - UtAssert_True(local_result == CLIST_CONT, "CF_CFDP_DoTick returned %d and should be %d (CLIST_CONT)", local_result, - CLIST_CONT); + UtAssert_True(local_result == CF_CLIST_CONT, "CF_CFDP_DoTick returned %d and should be %d (CF_CLIST_CONT)", + local_result, CF_CLIST_CONT); UtAssert_STUB_COUNT(Dummy_tick_args_t_fn, 1); UtAssert_NULL(dummy_args.c->cur); UtAssert_True(dummy_args.early_exit == initial_early_exit, @@ -6413,7 +6413,7 @@ void Test_CF_CFDP_DoTick_Given_context_Determined_args_c_cur_Is_t_And_t_flags_al /* Arrange */ CF_Channel_t dummy_c; CF_Transaction_t dummy_t; - clist_node arg_node = &dummy_t.cl_node; + CF_CListNode_t *arg_node = &dummy_t.cl_node; tick_args_t dummy_args; void *arg_context = (void *)&dummy_args; int local_result; @@ -6434,8 +6434,8 @@ void Test_CF_CFDP_DoTick_Given_context_Determined_args_c_cur_Is_t_And_t_flags_al local_result = CF_CFDP_DoTick(arg_node, arg_context); /* Assert */ - UtAssert_True(local_result == CLIST_EXIT, "CF_CFDP_DoTick returned %d and should be %d (CLIST_EXIT)", local_result, - CLIST_EXIT); + UtAssert_True(local_result == CF_CLIST_EXIT, "CF_CFDP_DoTick returned %d and should be %d (CF_CLIST_EXIT)", + local_result, CF_CLIST_EXIT); UtAssert_STUB_COUNT(Dummy_tick_args_t_fn, 1); UtAssert_NOT_NULL(dummy_args.c->cur); UtAssert_True(dummy_args.early_exit == 1, "args->early_exit is %d and should be 1", dummy_args.early_exit); @@ -6716,7 +6716,7 @@ void Test_CF_CFDP_TxFile_DoesNotError(void) arg_t->history = &dummy_history; /* Arrange for CF_CFDP_FindUnusedChunks */ - clist_node_t dummy_cs; + CF_CListNode_t dummy_cs; CF_AppData.engine.channels[arg_chan].cs[CF_Direction_TX] = &dummy_cs; @@ -6928,7 +6928,7 @@ void Test_CF_CFDP_TxFile_SuccessIncrements_c_num_cmd_tx_AndSets_t_flags_tx_cmd_t CF_AppData.config_table = &dummy_config_table; /* Arrange for CF_CFDP_FindUnusedChunks */ - clist_node_t dummy_cs; + CF_CListNode_t dummy_cs; dummy_c->cs[CF_Direction_TX] = &dummy_cs; @@ -7356,7 +7356,7 @@ void Test_CF_CFDP_ProcessPlaybackDirectory_FirstCallTo_OS_DirectoryRead_Returns_ CF_AppData.config_table = &dummy_config_table; /* Arrange for CF_CFDP_FindUnusedChunks */ - clist_node_t dummy_cs; + CF_CListNode_t dummy_cs; arg_c->cs[CF_Direction_TX] = &dummy_cs; @@ -8801,7 +8801,7 @@ void Test_CF_CFDP_CloseFiles_DoesNothingBecause_t_fd_Is_0_Returns_CLIST_CONT(voi { /* Arrange */ CF_Transaction_t dummy_t; - clist_node arg_n = &dummy_t.cl_node; + CF_CListNode_t *arg_n = &dummy_t.cl_node; void *arg_context = NULL; int local_result; @@ -8811,8 +8811,8 @@ void Test_CF_CFDP_CloseFiles_DoesNothingBecause_t_fd_Is_0_Returns_CLIST_CONT(voi local_result = CF_CFDP_CloseFiles(arg_n, arg_context); /* Assert */ - UtAssert_True(local_result == CLIST_CONT, "CF_CFDP_CloseFiles returned %u and should be %u (CLIST_CONT)", - local_result, CLIST_CONT); + UtAssert_True(local_result == CF_CLIST_CONT, "CF_CFDP_CloseFiles returned %u and should be %u (CF_CLIST_CONT)", + local_result, CF_CLIST_CONT); UtAssert_STUB_COUNT(CF_WrappedClose, 0); } /* end Test_CF_CFDP_CloseFiles_DoesNothingBecause_t_fd_Is_0_Returns_CLIST_CONT */ @@ -8821,7 +8821,7 @@ void Test_CF_CFDP_CloseFiles_Calls_CF_WrappedClose_Because_t_fd_Is_not0_Returns_ { /* Arrange */ CF_Transaction_t dummy_t; - clist_node arg_n = &dummy_t.cl_node; + CF_CListNode_t *arg_n = &dummy_t.cl_node; void *arg_context = NULL; int local_result; int32 context_CF_CFDP_CloseFiles; @@ -8834,8 +8834,8 @@ void Test_CF_CFDP_CloseFiles_Calls_CF_WrappedClose_Because_t_fd_Is_not0_Returns_ local_result = CF_CFDP_CloseFiles(arg_n, arg_context); /* Assert */ - UtAssert_True(local_result == CLIST_CONT, "CF_CFDP_CloseFiles returned %u and should be %u (CLIST_CONT)", - local_result, CLIST_CONT); + UtAssert_True(local_result == CF_CLIST_CONT, "CF_CFDP_CloseFiles returned %u and should be %u (CF_CLIST_CONT)", + local_result, CF_CLIST_CONT); UtAssert_STUB_COUNT(CF_WrappedClose, 1); UtAssert_True(context_CF_CFDP_CloseFiles == dummy_t.fd, "CF_WrappedClose received fd %d should be %d (t->fd)", context_CF_CFDP_CloseFiles, dummy_t.fd); @@ -8870,7 +8870,7 @@ void Test_CF_CFDP_DisableEngine_ClosesAllActiveFilesAndNoOpenPlaybackDirectories dummy_channel[ci]->pipe = CFE_SB_PIPEID_C(CFE_ResourceId_FromInteger(1 + ci)); for (qi = 0; qi < num_clist_node_ptrs; ++qi) { - (CF_AppData.engine.channels + ci)->qs[qs_index[qi]] = malloc(sizeof(clist_node)); + (CF_AppData.engine.channels + ci)->qs[qs_index[qi]] = malloc(sizeof(CF_CListNode_t *)); } } @@ -8960,7 +8960,7 @@ void Test_CF_CFDP_DisableEngine_ClosesAllActiveFilesAndAnyOpenPlaybackDirectorie dummy_channel[ci]->pipe = CFE_SB_PIPEID_C(CFE_ResourceId_FromInteger(1 + ci)); for (qi = 0; qi < num_clist_node_ptrs; ++qi) { - (CF_AppData.engine.channels + ci)->qs[qs_index[qi]] = malloc(sizeof(clist_node)); + (CF_AppData.engine.channels + ci)->qs[qs_index[qi]] = malloc(sizeof(CF_CListNode_t *)); } } @@ -9067,7 +9067,7 @@ void Test_CF_CFDP_DisableEngine_ClosesAllActiveFilesAndAllOpenPlaybackDirectorie dummy_channel[ci]->pipe = CFE_SB_PIPEID_C(CFE_ResourceId_FromInteger(1 + ci)); for (qi = 0; qi < num_clist_node_ptrs; ++qi) { - (CF_AppData.engine.channels + ci)->qs[qs_index[qi]] = malloc(sizeof(clist_node)); + (CF_AppData.engine.channels + ci)->qs[qs_index[qi]] = malloc(sizeof(CF_CListNode_t *)); } } diff --git a/unit-test/cf_clist_tests.c b/unit-test/cf_clist_tests.c index f06b9efb..53042d42 100644 --- a/unit-test/cf_clist_tests.c +++ b/unit-test/cf_clist_tests.c @@ -8,7 +8,7 @@ ** *******************************************************************************/ -int Dummy_clist_fn_t(clist_node node, void *context) +int Dummy_clist_fn_t(CF_CListNode_t *node, void *context) { UT_Stub_CopyFromLocal(UT_KEY(Dummy_clist_fn_t), &node, sizeof(node)); UT_Stub_CopyFromLocal(UT_KEY(Dummy_clist_fn_t), &context, sizeof(context)); @@ -17,7 +17,7 @@ int Dummy_clist_fn_t(clist_node node, void *context) return (int)UT_DEFAULT_IMPL(Dummy_clist_fn_t); } -int Hook_clist_fn_t(clist_node node, void *context) +int Hook_clist_fn_t(CF_CListNode_t *node, void *context) { /* Modification of node to meet n->next!=nn as true for coverage */ @@ -32,13 +32,13 @@ int Hook_clist_fn_t(clist_node node, void *context) } typedef struct { - clist_node node; - void *context; + CF_CListNode_t *node; + void *context; } CF_PACK Dummy_clist_fn_t_context_t; typedef struct { - clist_node node; - void *context; + CF_CListNode_t *node; + void *context; } CF_PACK Hook_clist_fn_t_context_t; /******************************************************************************* @@ -68,7 +68,7 @@ void cf_clist_tests_Teardown(void) void Test_CF_CList_InitNode_PointNodeToItselfAsNextAndPrev(void) { /* Arrange */ - clist_node_t test_node; + CF_CListNode_t test_node; test_node.next = NULL; test_node.prev = NULL; @@ -123,10 +123,10 @@ void Test_CF_CList_InsertFront_AssertsBecauseNodePrevDoesNotPointToItself(void) void Test_CF_CList_InsertFront_InsertNodeIntoEmptyList(void) { /* Arrange */ - clist_node dummy_head = NULL; - clist_node *arg_head = &dummy_head; - clist_node_t dummy_node; - clist_node arg_node = &dummy_node; + CF_CListNode_t *dummy_head = NULL; + CF_CListNode_t **arg_head = &dummy_head; + CF_CListNode_t dummy_node; + CF_CListNode_t *arg_node = &dummy_node; arg_node->next = &dummy_node; arg_node->prev = &dummy_node; @@ -141,11 +141,11 @@ void Test_CF_CList_InsertFront_InsertNodeIntoEmptyList(void) void Test_CF_CList_InsertFront_WhenHeadIsOnlyNodeAndTheyPointToEachOtherInsertNode(void) { /* Arrange */ - clist_node_t dummy_head_node; - clist_node dummy_head = &dummy_head_node; - clist_node *arg_head = &dummy_head; - clist_node_t dummy_node; - clist_node arg_node = &dummy_node; + CF_CListNode_t dummy_head_node; + CF_CListNode_t *dummy_head = &dummy_head_node; + CF_CListNode_t **arg_head = &dummy_head; + CF_CListNode_t dummy_node; + CF_CListNode_t *arg_node = &dummy_node; (*arg_head)->next = dummy_head; (*arg_head)->prev = dummy_head; @@ -168,12 +168,12 @@ void Test_CF_CList_InsertFront_WhenHeadIsOnlyNodeAndTheyPointToEachOtherInsertNo void Test_CF_CList_InsertFront_WhenHeadIsOneOfTwoNodesAndTheyPointToCorrectNodesInsertNode(void) { /* Arrange */ - clist_node_t dummy_head_node; - clist_node dummy_head = &dummy_head_node; - clist_node *arg_head = &dummy_head; - clist_node_t dummy_node; - clist_node arg_node = &dummy_node; - clist_node_t dummy_last_node; + CF_CListNode_t dummy_head_node; + CF_CListNode_t *dummy_head = &dummy_head_node; + CF_CListNode_t **arg_head = &dummy_head; + CF_CListNode_t dummy_node; + CF_CListNode_t *arg_node = &dummy_node; + CF_CListNode_t dummy_last_node; dummy_last_node.next = &dummy_head_node; dummy_last_node.prev = &dummy_head_node; @@ -201,23 +201,23 @@ void Test_CF_CList_InsertFront_WhenHeadIsOneOfTwoNodesAndTheyPointToCorrectNodes void Test_CF_CList_InsertFront_WhenNodeListIsGreaterThanTwoNodesAndTheyPointToCorrectNodesInsertNode(void) { /* Arrange */ - clist_node_t dummy_head_node; - clist_node dummy_head = &dummy_head_node; - clist_node *arg_head = &dummy_head; - clist_node_t dummy_node; - clist_node arg_node = &dummy_node; - clist_node_t dummy_last_node; - clist_node dummy_second_node; - clist_node dummy_next_to_last_node; - uint8 num_extraneous_nodes = Any_uint8_LessThan(18) + 1; // 1 to 18 - int i = 0; + CF_CListNode_t dummy_head_node; + CF_CListNode_t *dummy_head = &dummy_head_node; + CF_CListNode_t **arg_head = &dummy_head; + CF_CListNode_t dummy_node; + CF_CListNode_t *arg_node = &dummy_node; + CF_CListNode_t dummy_last_node; + CF_CListNode_t *dummy_second_node; + CF_CListNode_t *dummy_next_to_last_node; + uint8 num_extraneous_nodes = Any_uint8_LessThan(18) + 1; // 1 to 18 + int i = 0; dummy_second_node = NULL; dummy_next_to_last_node = NULL; for (i = 0; i < num_extraneous_nodes; ++i) { - clist_node dummy_clist_node = malloc(sizeof(*dummy_clist_node)); + CF_CListNode_t *dummy_clist_node = malloc(sizeof(*dummy_clist_node)); if (i == 0) { @@ -258,12 +258,12 @@ void Test_CF_CList_InsertFront_WhenNodeListIsGreaterThanTwoNodesAndTheyPointToCo /* removes all malloc nodes - arg_node head (not malloc) -> next is old head (not malloc) -> next is second node * (malloc) */ - clist_node free_up_node = arg_node->next->next; + CF_CListNode_t *free_up_node = arg_node->next->next; for (i = 0; i < num_extraneous_nodes; ++i) { - clist_node old_free_up_node = free_up_node; - free_up_node = old_free_up_node->next; + CF_CListNode_t *old_free_up_node = free_up_node; + free_up_node = old_free_up_node->next; free(old_free_up_node); } @@ -310,10 +310,10 @@ void Test_CF_CList_InsertBack_AssertsBecauseNodePrevDoesNotPointToItself(void) void Test_CF_CList_InsertBack_InsertNodeIntoEmptyList(void) { /* Arrange */ - clist_node dummy_head = NULL; - clist_node *arg_head = &dummy_head; - clist_node_t dummy_node; - clist_node arg_node = &dummy_node; + CF_CListNode_t *dummy_head = NULL; + CF_CListNode_t **arg_head = &dummy_head; + CF_CListNode_t dummy_node; + CF_CListNode_t *arg_node = &dummy_node; arg_node->next = &dummy_node; arg_node->prev = &dummy_node; @@ -328,11 +328,11 @@ void Test_CF_CList_InsertBack_InsertNodeIntoEmptyList(void) void Test_CF_CList_InsertBack_WhenHeadIsOnlyNodeAndTheyPointToEachOtherInsertNode(void) { /* Arrange */ - clist_node_t dummy_head_node; - clist_node dummy_head = &dummy_head_node; - clist_node *arg_head = &dummy_head; - clist_node_t dummy_node; - clist_node arg_node = &dummy_node; + CF_CListNode_t dummy_head_node; + CF_CListNode_t *dummy_head = &dummy_head_node; + CF_CListNode_t **arg_head = &dummy_head; + CF_CListNode_t dummy_node; + CF_CListNode_t *arg_node = &dummy_node; (*arg_head)->next = dummy_head; (*arg_head)->prev = dummy_head; @@ -355,12 +355,12 @@ void Test_CF_CList_InsertBack_WhenHeadIsOnlyNodeAndTheyPointToEachOtherInsertNod void Test_CF_CList_InsertBack_WhenHeadIsOneOfTwoNodesAndTheyPointToCorrectNodesInsertNode(void) { /* Arrange */ - clist_node_t dummy_head_node; - clist_node dummy_head = &dummy_head_node; - clist_node *arg_head = &dummy_head; - clist_node_t dummy_node; - clist_node arg_node = &dummy_node; - clist_node_t dummy_last_node; + CF_CListNode_t dummy_head_node; + CF_CListNode_t *dummy_head = &dummy_head_node; + CF_CListNode_t **arg_head = &dummy_head; + CF_CListNode_t dummy_node; + CF_CListNode_t *arg_node = &dummy_node; + CF_CListNode_t dummy_last_node; dummy_last_node.next = &dummy_head_node; dummy_last_node.prev = &dummy_head_node; @@ -388,23 +388,23 @@ void Test_CF_CList_InsertBack_WhenHeadIsOneOfTwoNodesAndTheyPointToCorrectNodesI void Test_CF_CList_InsertBack_WhenNodeListIsGreaterThanTwoNodesAndTheyPointToCorrectNodesInsertNode(void) { /* Arrange */ - clist_node_t dummy_head_node; - clist_node dummy_head = &dummy_head_node; - clist_node *arg_head = &dummy_head; - clist_node_t dummy_node; - clist_node arg_node = &dummy_node; - clist_node_t dummy_last_node; - clist_node dummy_second_node; - clist_node dummy_next_to_last_node; - uint8 num_extraneous_nodes = Any_uint8_LessThan(18) + 1; // 1 to 18 - int i = 0; + CF_CListNode_t dummy_head_node; + CF_CListNode_t *dummy_head = &dummy_head_node; + CF_CListNode_t **arg_head = &dummy_head; + CF_CListNode_t dummy_node; + CF_CListNode_t *arg_node = &dummy_node; + CF_CListNode_t dummy_last_node; + CF_CListNode_t *dummy_second_node; + CF_CListNode_t *dummy_next_to_last_node; + uint8 num_extraneous_nodes = Any_uint8_LessThan(18) + 1; // 1 to 18 + int i = 0; dummy_second_node = NULL; dummy_next_to_last_node = NULL; for (i = 0; i < num_extraneous_nodes; ++i) { - clist_node dummy_clist_node = malloc(sizeof(*dummy_clist_node)); + CF_CListNode_t *dummy_clist_node = malloc(sizeof(*dummy_clist_node)); if (i == 0) { @@ -444,12 +444,12 @@ void Test_CF_CList_InsertBack_WhenNodeListIsGreaterThanTwoNodesAndTheyPointToCor UtAssert_ADDRESS_EQ(*arg_head, dummy_head); /* removes all malloc nodes */ - clist_node free_up_node = dummy_head->next; + CF_CListNode_t *free_up_node = dummy_head->next; for (i = 0; i < num_extraneous_nodes; ++i) { - clist_node old_free_up_node = free_up_node; - free_up_node = old_free_up_node->next; + CF_CListNode_t *old_free_up_node = free_up_node; + free_up_node = old_free_up_node->next; free(old_free_up_node); } @@ -472,9 +472,9 @@ void Test_CF_CList_Pop_AssertsBecause_head_Is_NULL(void) void Test_CF_CList_Pop_WhenListIsEmptySuccessReturn_NULL(void) { /* Arrange */ - clist_node dummy_head = NULL; - clist_node *arg_head = &dummy_head; - clist_node local_result; + CF_CListNode_t *dummy_head = NULL; + CF_CListNode_t **arg_head = &dummy_head; + CF_CListNode_t *local_result; /* Act */ local_result = CF_CList_Pop(arg_head); @@ -486,10 +486,10 @@ void Test_CF_CList_Pop_WhenListIsEmptySuccessReturn_NULL(void) void Test_CF_CList_Pop_WhenItIsOnlyNodePopHeadNodeAndReturn_head_(void) { /* Arrange */ - clist_node_t dummy_head_node; - clist_node dummy_head = &dummy_head_node; - clist_node *arg_head = &dummy_head; - clist_node local_result; + CF_CListNode_t dummy_head_node; + CF_CListNode_t *dummy_head = &dummy_head_node; + CF_CListNode_t **arg_head = &dummy_head; + CF_CListNode_t *local_result; /* Arrange unstubbable: CF_CList_Remove */ dummy_head->prev = dummy_head; @@ -505,20 +505,20 @@ void Test_CF_CList_Pop_WhenItIsOnlyNodePopHeadNodeAndReturn_head_(void) void Test_CF_CList_Pop_WhenListIsAnySizeGreaterThanOneSuccessPopsHeadNodeAndReturns_head(void) { /* Arrange */ - clist_node_t dummy_head_node; - clist_node dummy_head = &dummy_head_node; - clist_node *arg_head = &dummy_head; - clist_node_t dummy_last_node; - clist_node dummy_second_node = &dummy_last_node; - clist_node dummy_next_to_last_node = dummy_head; - uint8 num_extraneous_nodes = Any_uint8_LessThan(19); // 0 to 18 - int i = 0; - clist_node local_result; + CF_CListNode_t dummy_head_node; + CF_CListNode_t *dummy_head = &dummy_head_node; + CF_CListNode_t **arg_head = &dummy_head; + CF_CListNode_t dummy_last_node; + CF_CListNode_t *dummy_second_node = &dummy_last_node; + CF_CListNode_t *dummy_next_to_last_node = dummy_head; + uint8 num_extraneous_nodes = Any_uint8_LessThan(19); // 0 to 18 + int i = 0; + CF_CListNode_t *local_result; /* Arrange unstubbable: CF_CList_Remove */ for (i = 0; i < num_extraneous_nodes; ++i) { - clist_node dummy_clist_node = malloc(sizeof(*dummy_clist_node)); + CF_CListNode_t *dummy_clist_node = malloc(sizeof(*dummy_clist_node)); if (i == 0) { @@ -549,12 +549,12 @@ void Test_CF_CList_Pop_WhenListIsAnySizeGreaterThanOneSuccessPopsHeadNodeAndRetu UtAssert_ADDRESS_EQ(local_result, &dummy_head_node); /* removes all malloc nodes */ - clist_node free_up_node = dummy_second_node; + CF_CListNode_t *free_up_node = dummy_second_node; for (i = 0; i < num_extraneous_nodes; ++i) { - clist_node old_free_up_node = free_up_node; - free_up_node = old_free_up_node->next; + CF_CListNode_t *old_free_up_node = free_up_node; + free_up_node = old_free_up_node->next; free(old_free_up_node); } } /* end Test_CF_CList_Pop_WhenListIsAnySizeGreaterThanOneSuccessPopsHeadNodeAndReturns_head */ @@ -592,8 +592,8 @@ void Test_CF_CList_Remove_AssertsBecauseHeadPointedAtValueIs_NULL(void) void Test_CF_ClistRemove_AssertsBecauseHeadPointedAtValueIsNotNode(void) { /* Arrange */ - clist_node_t dummy_node; - clist_node arg_node = &dummy_node; + CF_CListNode_t dummy_node; + CF_CListNode_t *arg_node = &dummy_node; arg_node->prev = arg_node; arg_node->next = arg_node; @@ -608,9 +608,9 @@ void Test_CF_ClistRemove_AssertsBecauseHeadPointedAtValueIsNotNode(void) void Test_CF_ClistRemove_WhenOnlyNodeSetHeadTo_NULL(void) { /* Arrange */ - clist_node_t dummy_node; - clist_node arg_node = &dummy_node; - clist_node *arg_head = &arg_node; + CF_CListNode_t dummy_node; + CF_CListNode_t *arg_node = &dummy_node; + CF_CListNode_t **arg_head = &arg_node; arg_node->prev = arg_node; arg_node->next = arg_node; @@ -628,11 +628,11 @@ void Test_CF_ClistRemove_WhenOnlyNodeSetHeadTo_NULL(void) void Test_CF_ClistRemove_WhenOnlyTwoNodesAndLastIsRemovedSetHeadToPointToItself(void) { /* Arrange */ - clist_node_t dummy_head_node; - clist_node dummy_head = &dummy_head_node; - clist_node *arg_head = &dummy_head; - clist_node_t dummy_arg_node; - clist_node arg_node = &dummy_arg_node; + CF_CListNode_t dummy_head_node; + CF_CListNode_t *dummy_head = &dummy_head_node; + CF_CListNode_t **arg_head = &dummy_head; + CF_CListNode_t dummy_arg_node; + CF_CListNode_t *arg_node = &dummy_arg_node; dummy_head_node.prev = arg_node; dummy_head_node.next = arg_node; @@ -655,22 +655,22 @@ void Test_CF_ClistRemove_WhenOnlyTwoNodesAndLastIsRemovedSetHeadToPointToItself( void Test_CF_ClistRemove_RemovingHeadSetSecondNodeToHeadAndUpdateLastNode(void) { /* Arrange */ - clist_node_t dummy_head_node; - clist_node dummy_head = &dummy_head_node; - clist_node *arg_head = &dummy_head; - clist_node arg_node = *arg_head; - clist_node_t dummy_last_node; - clist_node dummy_second_node; - clist_node dummy_next_to_last_node; - uint8 num_extraneous_nodes = Any_uint8_LessThan(18) + 1; // 1 to 18 - int i = 0; + CF_CListNode_t dummy_head_node; + CF_CListNode_t *dummy_head = &dummy_head_node; + CF_CListNode_t **arg_head = &dummy_head; + CF_CListNode_t *arg_node = *arg_head; + CF_CListNode_t dummy_last_node; + CF_CListNode_t *dummy_second_node; + CF_CListNode_t *dummy_next_to_last_node; + uint8 num_extraneous_nodes = Any_uint8_LessThan(18) + 1; // 1 to 18 + int i = 0; dummy_second_node = NULL; dummy_next_to_last_node = NULL; for (i = 0; i < num_extraneous_nodes; ++i) { - clist_node dummy_clist_node = malloc(sizeof(*dummy_clist_node)); + CF_CListNode_t *dummy_clist_node = malloc(sizeof(*dummy_clist_node)); if (i == 0) { @@ -707,12 +707,12 @@ void Test_CF_ClistRemove_RemovingHeadSetSecondNodeToHeadAndUpdateLastNode(void) /* removes all malloc nodes */ /* dummy_head is old second node (head removed) which was malloc'd */ - clist_node free_up_node = dummy_head; + CF_CListNode_t *free_up_node = dummy_head; for (i = 0; i < num_extraneous_nodes; ++i) { - clist_node old_free_up_node = free_up_node; - free_up_node = old_free_up_node->next; + CF_CListNode_t *old_free_up_node = free_up_node; + free_up_node = old_free_up_node->next; free(old_free_up_node); } } /* end Test_CF_ClistRemove_RemovingHeadSetSecondNodeToHeadAndUpdateLastNode */ @@ -720,22 +720,22 @@ void Test_CF_ClistRemove_RemovingHeadSetSecondNodeToHeadAndUpdateLastNode(void) void Test_CF_ClistRemove_RemovingLastPointHeadAndNextToLastToEachOther(void) { /* Arrange */ - clist_node_t dummy_head_node; - clist_node dummy_head = &dummy_head_node; - clist_node *arg_head = &dummy_head; - clist_node_t dummy_last_node; - clist_node arg_node = &dummy_last_node; - clist_node dummy_second_node; - clist_node dummy_next_to_last_node; - uint8 num_extraneous_nodes = Any_uint8_LessThan(18) + 1; // 1 to 18 - int i = 0; + CF_CListNode_t dummy_head_node; + CF_CListNode_t *dummy_head = &dummy_head_node; + CF_CListNode_t **arg_head = &dummy_head; + CF_CListNode_t dummy_last_node; + CF_CListNode_t *arg_node = &dummy_last_node; + CF_CListNode_t *dummy_second_node; + CF_CListNode_t *dummy_next_to_last_node; + uint8 num_extraneous_nodes = Any_uint8_LessThan(18) + 1; // 1 to 18 + int i = 0; dummy_second_node = NULL; dummy_next_to_last_node = NULL; for (i = 0; i < num_extraneous_nodes; ++i) { - clist_node dummy_clist_node = malloc(sizeof(*dummy_clist_node)); + CF_CListNode_t *dummy_clist_node = malloc(sizeof(*dummy_clist_node)); if (i == 0) { @@ -771,12 +771,12 @@ void Test_CF_ClistRemove_RemovingLastPointHeadAndNextToLastToEachOther(void) UtAssert_ADDRESS_EQ(dummy_last_node.next, &dummy_last_node); /* removes all malloc nodes */ - clist_node free_up_node = dummy_head->next; + CF_CListNode_t *free_up_node = dummy_head->next; for (i = 0; i < num_extraneous_nodes; ++i) { - clist_node old_free_up_node = free_up_node; - free_up_node = old_free_up_node->next; + CF_CListNode_t *old_free_up_node = free_up_node; + free_up_node = old_free_up_node->next; free(old_free_up_node); } } /* end Test_CF_ClistRemove_RemovingLastPointHeadAndNextToLastToEachOther */ @@ -784,19 +784,19 @@ void Test_CF_ClistRemove_RemovingLastPointHeadAndNextToLastToEachOther(void) void Test_CF_ClistRemove_RemovingAnyNodeHasNodesPrevAndNextPointToEachOther(void) { /* Arrange */ - clist_node_t dummy_head_node; - clist_node dummy_head = &dummy_head_node; - clist_node *arg_head = &dummy_head; - clist_node_t dummy_last_node; - clist_node dummy_removed_node; - clist_node dummy_removed_node_prev; - clist_node dummy_removed_node_next; - clist_node arg_node; - clist_node dummy_second_node; - clist_node dummy_next_to_last_node; - uint8 num_extraneous_nodes = Any_uint8_LessThan(18) + 1; // 1 to 18 - uint8 num_of_removed_node = Any_uint8_LessThan(num_extraneous_nodes); - int i = 0; + CF_CListNode_t dummy_head_node; + CF_CListNode_t *dummy_head = &dummy_head_node; + CF_CListNode_t **arg_head = &dummy_head; + CF_CListNode_t dummy_last_node; + CF_CListNode_t *dummy_removed_node; + CF_CListNode_t *dummy_removed_node_prev; + CF_CListNode_t *dummy_removed_node_next; + CF_CListNode_t *arg_node; + CF_CListNode_t *dummy_second_node; + CF_CListNode_t *dummy_next_to_last_node; + uint8 num_extraneous_nodes = Any_uint8_LessThan(18) + 1; // 1 to 18 + uint8 num_of_removed_node = Any_uint8_LessThan(num_extraneous_nodes); + int i = 0; dummy_removed_node = NULL; arg_node = NULL; @@ -805,7 +805,7 @@ void Test_CF_ClistRemove_RemovingAnyNodeHasNodesPrevAndNextPointToEachOther(void for (i = 0; i < num_extraneous_nodes; ++i) { - clist_node dummy_clist_node = malloc(sizeof(*dummy_clist_node)); + CF_CListNode_t *dummy_clist_node = malloc(sizeof(*dummy_clist_node)); if (i == num_of_removed_node) { @@ -849,14 +849,14 @@ void Test_CF_ClistRemove_RemovingAnyNodeHasNodesPrevAndNextPointToEachOther(void UtAssert_ADDRESS_EQ(dummy_removed_node->next, dummy_removed_node); /* removes all malloc nodes */ - clist_node free_up_node = dummy_head->next; + CF_CListNode_t *free_up_node = dummy_head->next; /* free removed node because it was malloc'd */ free(dummy_removed_node); /* subtract one because of node removal */ for (i = 0; i < num_extraneous_nodes - 1; ++i) { - clist_node old_free_up_node = free_up_node; - free_up_node = old_free_up_node->next; + CF_CListNode_t *old_free_up_node = free_up_node; + free_up_node = old_free_up_node->next; free(old_free_up_node); } @@ -865,11 +865,11 @@ void Test_CF_ClistRemove_RemovingAnyNodeHasNodesPrevAndNextPointToEachOther(void void Test_CF_CList_Remove_ReceivesBad_node_Because_next_PointsTo_node_But_prev_DoesNot(void) { // /* Arrange */ - // clist_node_t dummy_head_node; - // clist_node dummy_head = &dummy_head_node; - // clist_node* arg_head = &dummy_head; - // clist_node_t dummy_last_node; - // clist_node arg_node = &dummy_last_node; + // CF_CListNode_t dummy_head_node; + // CF_CListNode_t * dummy_head = &dummy_head_node; + // CF_CListNode_t ** arg_head = &dummy_head; + // CF_CListNode_t dummy_last_node; + // CF_CListNode_t * arg_node = &dummy_last_node; // dummy_head->prev = dummy_head; // dummy_head->next = dummy_head; @@ -905,9 +905,9 @@ void Test_CF_CList_Remove_ReceivesBad_node_Because_next_PointsTo_node_But_prev_D void Test_CF_CList_InsertAfter_AssertsBecause_head_Is_NULL(void) { /* Arrange */ - // clist_node* arg_head = NULL; - // clist_node arg_start; - // clist_node arg_after; + // CF_CListNode_t ** arg_head = NULL; + // CF_CListNode_t * arg_start; + // CF_CListNode_t * arg_after; /* Act */ // CF_CList_InsertAfter(arg_head, arg_start, arg_after); @@ -919,10 +919,10 @@ void Test_CF_CList_InsertAfter_AssertsBecause_head_Is_NULL(void) void Test_CF_CList_InsertAfter_AssertsBecauseValueAt_head_Is_NULL(void) { /* Arrange */ - // clist_node dummy_head = NULL; - // clist_node* arg_head = &dummy_head; - // clist_node arg_start; - // clist_node arg_after; + // CF_CListNode_t * dummy_head = NULL; + // CF_CListNode_t ** arg_head = &dummy_head; + // CF_CListNode_t * arg_start; + // CF_CListNode_t * arg_after; /* Act */ // CF_CList_InsertAfter(arg_head, arg_start, arg_after); @@ -934,11 +934,11 @@ void Test_CF_CList_InsertAfter_AssertsBecauseValueAt_head_Is_NULL(void) void Test_CF_CList_InsertAfter_AssertsBecause_start_Is_NULL(void) { /* Arrange */ - // clist_node_t dummy_head_node; - // clist_node dummy_head = &dummy_head_node; - // clist_node* arg_head = &dummy_head; - // clist_node arg_start = NULL; - // clist_node arg_after; + // CF_CListNode_t dummy_head_node; + // CF_CListNode_t * dummy_head = &dummy_head_node; + // CF_CListNode_t ** arg_head = &dummy_head; + // CF_CListNode_t * arg_start = NULL; + // CF_CListNode_t * arg_after; /* Act */ // CF_CList_InsertAfter(arg_head, arg_start, arg_after); @@ -950,12 +950,12 @@ void Test_CF_CList_InsertAfter_AssertsBecause_start_Is_NULL(void) void Test_CF_CList_InsertAfter_AssertsBecause_start_IsEqTo_after(void) { /* Arrange */ - // clist_node_t dummy_head_node; - // clist_node dummy_head = &dummy_head_node; - // clist_node* arg_head = &dummy_head; - // clist_node_t dummy_start_node; - // clist_node arg_start = &dummy_start_node; - // clist_node arg_after = arg_start; + // CF_CListNode_t dummy_head_node; + // CF_CListNode_t * dummy_head = &dummy_head_node; + // CF_CListNode_t ** arg_head = &dummy_head; + // CF_CListNode_t dummy_start_node; + // CF_CListNode_t * arg_start = &dummy_start_node; + // CF_CListNode_t * arg_after = arg_start; /* Act */ // CF_CList_InsertAfter(arg_head, arg_start, arg_after); @@ -967,12 +967,12 @@ void Test_CF_CList_InsertAfter_AssertsBecause_start_IsEqTo_after(void) void Test_CF_CList_InsertAfter_WhenOnlyOneNodeSuccess_after_IsInsertedAfter_start(void) { /* Arrange */ - clist_node_t dummy_head_node; - clist_node dummy_head = &dummy_head_node; - clist_node *arg_head = &dummy_head; - clist_node arg_start = dummy_head; - clist_node_t dummy_after_node; - clist_node arg_after = &dummy_after_node; + CF_CListNode_t dummy_head_node; + CF_CListNode_t *dummy_head = &dummy_head_node; + CF_CListNode_t **arg_head = &dummy_head; + CF_CListNode_t *arg_start = dummy_head; + CF_CListNode_t dummy_after_node; + CF_CListNode_t *arg_after = &dummy_after_node; dummy_head->prev = dummy_head; dummy_head->next = dummy_head; @@ -994,26 +994,26 @@ void Test_CF_CList_InsertAfter_WhenAnyNodeSuccess_after_IsInsertedAfter_start(vo { /* Arrange */ /* Arrange */ - clist_node_t dummy_head_node; - clist_node dummy_head = &dummy_head_node; - clist_node *arg_head = &dummy_head; - clist_node_t dummy_last_node; - clist_node dummy_second_node; - clist_node dummy_next_to_last_node; - clist_node arg_start; - clist_node_t dummy_after; - clist_node arg_after = &dummy_after; - clist_node dummy_after_next; - uint8 num_extraneous_nodes = Any_uint8_LessThan(18) + 1; // 1 to 18 - uint8 insertion_point = Any_uint8_LessThan(num_extraneous_nodes); - int i = 0; + CF_CListNode_t dummy_head_node; + CF_CListNode_t *dummy_head = &dummy_head_node; + CF_CListNode_t **arg_head = &dummy_head; + CF_CListNode_t dummy_last_node; + CF_CListNode_t *dummy_second_node; + CF_CListNode_t *dummy_next_to_last_node; + CF_CListNode_t *arg_start; + CF_CListNode_t dummy_after; + CF_CListNode_t *arg_after = &dummy_after; + CF_CListNode_t *dummy_after_next; + uint8 num_extraneous_nodes = Any_uint8_LessThan(18) + 1; // 1 to 18 + uint8 insertion_point = Any_uint8_LessThan(num_extraneous_nodes); + int i = 0; dummy_second_node = NULL; dummy_next_to_last_node = NULL; for (i = 0; i < num_extraneous_nodes; ++i) { - clist_node dummy_clist_node = malloc(sizeof(*dummy_clist_node)); + CF_CListNode_t *dummy_clist_node = malloc(sizeof(*dummy_clist_node)); if (i == 0) { @@ -1058,7 +1058,7 @@ void Test_CF_CList_InsertAfter_WhenAnyNodeSuccess_after_IsInsertedAfter_start(vo UtAssert_ADDRESS_EQ(dummy_after_next->prev, arg_after); /* removes all malloc nodes */ - clist_node free_up_node = dummy_head->next; + CF_CListNode_t *free_up_node = dummy_head->next; for (i = 0; i < num_extraneous_nodes; ++i) { @@ -1068,8 +1068,8 @@ void Test_CF_CList_InsertAfter_WhenAnyNodeSuccess_after_IsInsertedAfter_start(vo free_up_node = free_up_node->next; } - clist_node old_free_up_node = free_up_node; - free_up_node = old_free_up_node->next; + CF_CListNode_t *old_free_up_node = free_up_node; + free_up_node = old_free_up_node->next; free(old_free_up_node); } } /* end Test_CF_CList_InsertAfter_WhenAnyNodeSuccess_after_IsInsertedAfter_start */ @@ -1085,9 +1085,9 @@ void Test_CF_CList_InsertAfter_WhenAnyNodeSuccess_after_IsInsertedAfter_start(vo void Test_CF_CList_Traverse_When_start_Is_NULL_DoNothing(void) { /* Arrange */ - clist_node arg_start = NULL; - clist_fn_t arg_fn = Dummy_clist_fn_t; - void *arg_context = NULL; + CF_CListNode_t *arg_start = NULL; + CF_CListFn_t arg_fn = Dummy_clist_fn_t; + void *arg_context = NULL; /* Act */ CF_CList_Traverse(arg_start, arg_fn, arg_context); @@ -1099,9 +1099,9 @@ void Test_CF_CList_Traverse_When_start_Is_NULL_DoNothing(void) void Test_CF_CList_Traverse_WhenListIsMoreThanOneNodeErrorOutFirst_fn_CallFails(void) { /* Arrange */ - clist_node_t dummy_start; - clist_node arg_start = &dummy_start; - clist_fn_t arg_fn = Dummy_clist_fn_t; + CF_CListNode_t dummy_start; + CF_CListNode_t *arg_start = &dummy_start; + CF_CListFn_t arg_fn = Dummy_clist_fn_t; int dummy_context; void *arg_context = &dummy_context; Dummy_clist_fn_t_context_t context_Dummy_clist_fn_t; @@ -1123,9 +1123,9 @@ void Test_CF_CList_Traverse_WhenListIsMoreThanOneNodeErrorOutFirst_fn_CallFails( void Test_CF_CList_Traverse_WhenListIsOneNodeSuccess(void) { /* Arrange */ - clist_node_t dummy_start; - clist_node arg_start = &dummy_start; - clist_fn_t arg_fn = Dummy_clist_fn_t; + CF_CListNode_t dummy_start; + CF_CListNode_t *arg_start = &dummy_start; + CF_CListFn_t arg_fn = Dummy_clist_fn_t; int dummy_context; void *arg_context = &dummy_context; Dummy_clist_fn_t_context_t context_Dummy_clist_fn_t; @@ -1149,9 +1149,9 @@ void Test_CF_CList_Traverse_WhenListIsOneNodeSuccess(void) void Test_CF_CList_Traverse_CanActuallyGet_n_next_NotEqTo_nn_ButOnlyWithAn_fn_ThatForcesIt(void) { /* Arrange */ - clist_node_t dummy_start; - clist_node arg_start = &dummy_start; - clist_fn_t arg_fn = Hook_clist_fn_t; + CF_CListNode_t dummy_start; + CF_CListNode_t *arg_start = &dummy_start; + CF_CListFn_t arg_fn = Hook_clist_fn_t; int dummy_context; void *arg_context = &dummy_context; Hook_clist_fn_t_context_t context_Hook_clist_fn_t; @@ -1173,9 +1173,9 @@ void Test_CF_CList_Traverse_CanActuallyGet_n_next_NotEqTo_nn_ButOnlyWithAn_fn_Th void Test_CF_CList_Traverse_WhenListIsManyNodesErrorIn_fn_Call(void) { /* Arrange */ - clist_node arg_start; - clist_node adder_node; - clist_fn_t arg_fn = Dummy_clist_fn_t; + CF_CListNode_t *arg_start; + CF_CListNode_t *adder_node; + CF_CListFn_t arg_fn = Dummy_clist_fn_t; int dummy_context; void *arg_context = &dummy_context; uint8 list_size = Any_uint8_LessThan(9) + 2; /* 2 - 10 */ @@ -1189,7 +1189,7 @@ void Test_CF_CList_Traverse_WhenListIsManyNodesErrorIn_fn_Call(void) /* set up list */ for (i = 0; i < list_size; ++i) { - clist_node dummy_clist_node = malloc(sizeof(*dummy_clist_node)); + CF_CListNode_t *dummy_clist_node = malloc(sizeof(*dummy_clist_node)); if (i == 0) { @@ -1228,7 +1228,7 @@ void Test_CF_CList_Traverse_WhenListIsManyNodesErrorIn_fn_Call(void) UtAssert_True(context_Dummy_clist_fn_t[0].context == arg_context, "context_Dummy_clist_fn_t[0].context == arg_context"); - clist_node expected_node = arg_start->next; + CF_CListNode_t *expected_node = arg_start->next; for (i = 1; i <= error_location; ++i) { UtAssert_True(context_Dummy_clist_fn_t[i].node == expected_node, @@ -1239,12 +1239,12 @@ void Test_CF_CList_Traverse_WhenListIsManyNodesErrorIn_fn_Call(void) } /* removes all malloc nodes */ - clist_node free_up_node = arg_start; + CF_CListNode_t *free_up_node = arg_start; for (i = 0; i < list_size; ++i) { - clist_node old_free_up_node = free_up_node; - free_up_node = old_free_up_node->next; + CF_CListNode_t *old_free_up_node = free_up_node; + free_up_node = old_free_up_node->next; free(old_free_up_node); } } /* end Test_CF_CList_Traverse_WhenListIsManyNodesErrorIn_fn_Call */ @@ -1252,9 +1252,9 @@ void Test_CF_CList_Traverse_WhenListIsManyNodesErrorIn_fn_Call(void) void Test_CF_CList_Traverse_WhenListIsManyNodesSuccess(void) { /* Arrange */ - clist_node arg_start; - clist_node adder_node; - clist_fn_t arg_fn = Dummy_clist_fn_t; + CF_CListNode_t *arg_start; + CF_CListNode_t *adder_node; + CF_CListFn_t arg_fn = Dummy_clist_fn_t; int dummy_context; void *arg_context = &dummy_context; uint8 list_size = Any_uint8_LessThan(9) + 2; /* 2 - 10 */ @@ -1267,7 +1267,7 @@ void Test_CF_CList_Traverse_WhenListIsManyNodesSuccess(void) /* set up list */ for (i = 0; i < list_size; ++i) { - clist_node dummy_clist_node = malloc(sizeof(*dummy_clist_node)); + CF_CListNode_t *dummy_clist_node = malloc(sizeof(*dummy_clist_node)); if (i == 0) { @@ -1305,7 +1305,7 @@ void Test_CF_CList_Traverse_WhenListIsManyNodesSuccess(void) UtAssert_True(context_Dummy_clist_fn_t[0].context == arg_context, "context_Dummy_clist_fn_t[0].context == arg_context"); - clist_node expected_node = arg_start->next; + CF_CListNode_t *expected_node = arg_start->next; for (i = 1; i < list_size; ++i) { UtAssert_True(context_Dummy_clist_fn_t[i].node == expected_node, @@ -1316,12 +1316,12 @@ void Test_CF_CList_Traverse_WhenListIsManyNodesSuccess(void) } /* removes all malloc nodes */ - clist_node free_up_node = arg_start; + CF_CListNode_t *free_up_node = arg_start; for (i = 0; i < list_size; ++i) { - clist_node old_free_up_node = free_up_node; - free_up_node = old_free_up_node->next; + CF_CListNode_t *old_free_up_node = free_up_node; + free_up_node = old_free_up_node->next; free(old_free_up_node); } } /* end Test_CF_CList_Traverse_WhenListIsManyNodesSuccess */ @@ -1335,9 +1335,9 @@ void Test_CF_CList_Traverse_WhenListIsManyNodesSuccess(void) void Test_CF_CList_Traverse_R_When_end_Is_NULL_DoNothing(void) { /* Arrange */ - clist_node arg_end = NULL; - clist_fn_t arg_fn = NULL; - void *arg_context = NULL; + CF_CListNode_t *arg_end = NULL; + CF_CListFn_t arg_fn = NULL; + void *arg_context = NULL; /* Act */ CF_CList_Traverse_R(arg_end, arg_fn, arg_context); @@ -1349,11 +1349,11 @@ void Test_CF_CList_Traverse_R_When_end_Is_NULL_DoNothing(void) void Test_CF_CList_Traverse_R_When_end_prev_Is_NULLDoNothing(void) { /* Arrange */ - clist_node_t dummy_end; - clist_node arg_end = &dummy_end; - clist_fn_t arg_fn = Dummy_clist_fn_t; - int dummy_context; - void *arg_context = &dummy_context; + CF_CListNode_t dummy_end; + CF_CListNode_t *arg_end = &dummy_end; + CF_CListFn_t arg_fn = Dummy_clist_fn_t; + int dummy_context; + void *arg_context = &dummy_context; arg_end->prev = NULL; @@ -1367,13 +1367,13 @@ void Test_CF_CList_Traverse_R_When_end_prev_Is_NULLDoNothing(void) void Test_CF_CList_Traverse_R_WhenListIsMoreThanOneNodeErrorOutFirst_fn_CallFails(void) { /* Arrange */ - clist_node_t dummy_end; - clist_node arg_end = &dummy_end; - clist_fn_t arg_fn = Dummy_clist_fn_t; + CF_CListNode_t dummy_end; + CF_CListNode_t *arg_end = &dummy_end; + CF_CListFn_t arg_fn = Dummy_clist_fn_t; int dummy_context; void *arg_context = &dummy_context; - clist_node_t dummy_end_prev_node; - clist_node dummy_end_prev = &dummy_end_prev_node; + CF_CListNode_t dummy_end_prev_node; + CF_CListNode_t *dummy_end_prev = &dummy_end_prev_node; Dummy_clist_fn_t_context_t context_Dummy_clist_fn_t; arg_end->prev = dummy_end_prev; @@ -1393,9 +1393,9 @@ void Test_CF_CList_Traverse_R_WhenListIsMoreThanOneNodeErrorOutFirst_fn_CallFail void Test_CF_CList_Traverse_R_PassedIn_end_IsTheOnlyNode_fn_Returned_non0(void) { /* Arrange */ - clist_node_t dummy_end; - clist_node arg_end = &dummy_end; - clist_fn_t arg_fn = Dummy_clist_fn_t; + CF_CListNode_t dummy_end; + CF_CListNode_t *arg_end = &dummy_end; + CF_CListFn_t arg_fn = Dummy_clist_fn_t; int dummy_context; void *arg_context = &dummy_context; Dummy_clist_fn_t_context_t context_Dummy_clist_fn_t; @@ -1417,10 +1417,10 @@ void Test_CF_CList_Traverse_R_PassedIn_end_IsTheOnlyNode_fn_Returned_non0(void) void Test_CF_CList_Traverse_R_PassedIn_end_IsNotTheOnlyNode_fn_Returned_non0_Original_end_UsedLast(void) { /* Arrange */ - clist_node_t dummy_node; - clist_node_t dummy_end; - clist_node arg_end = &dummy_end; - clist_fn_t arg_fn = Dummy_clist_fn_t; + CF_CListNode_t dummy_node; + CF_CListNode_t dummy_end; + CF_CListNode_t *arg_end = &dummy_end; + CF_CListFn_t arg_fn = Dummy_clist_fn_t; int dummy_context; void *arg_context = &dummy_context; Dummy_clist_fn_t_context_t context_Dummy_clist_fn_t[2]; @@ -1447,9 +1447,9 @@ void Test_CF_CList_Traverse_R_PassedIn_end_IsNotTheOnlyNode_fn_Returned_non0_Ori void Test_CF_CList_Traverse_R_CanActuallyGet_n_next_NotEqTo_nn_ButOnlyWithAn_fn_ThatForcesIt(void) { /* Arrange */ - clist_node_t dummy_end; - clist_node arg_end = &dummy_end; - clist_fn_t arg_fn = Hook_clist_fn_t; + CF_CListNode_t dummy_end; + CF_CListNode_t *arg_end = &dummy_end; + CF_CListFn_t arg_fn = Hook_clist_fn_t; int dummy_context; void *arg_context = &dummy_context; Hook_clist_fn_t_context_t context_Hook_clist_fn_t; diff --git a/unit-test/cf_cmd_tests.c b/unit-test/cf_cmd_tests.c index a6a36808..bd24acb6 100644 --- a/unit-test/cf_cmd_tests.c +++ b/unit-test/cf_cmd_tests.c @@ -2500,7 +2500,7 @@ void Test_CF_PurgeHistory_Call_CF_CFDP_ResetHistory_AndReturn_CLIST_CONT(void) { /* Arrange */ CF_History_t dummy_h; - clist_node arg_n = &dummy_h.cl_node; + CF_CListNode_t *arg_n = &dummy_h.cl_node; CF_Channel_t dummy_c; CF_Channel_t *arg_c = &dummy_c; int local_result; @@ -2515,8 +2515,8 @@ void Test_CF_PurgeHistory_Call_CF_CFDP_ResetHistory_AndReturn_CLIST_CONT(void) /* Assert */ UtAssert_ADDRESS_EQ(context_CF_CFDP_ResetHistory.c, arg_c); UtAssert_ADDRESS_EQ(context_CF_CFDP_ResetHistory.h, &dummy_h); - UtAssert_True(local_result == CLIST_CONT, "CF_PurgeHistory returned %d and should be %d (CLIST_CONT)", local_result, - CLIST_CONT); + UtAssert_True(local_result == CF_CLIST_CONT, "CF_PurgeHistory returned %d and should be %d (CF_CLIST_CONT)", + local_result, CF_CLIST_CONT); } /* end Test_CF_PurgeHistory_Call_CF_CFDP_ResetHistory_AndReturn_CLIST_CONT */ @@ -2530,7 +2530,7 @@ void Test_CF_PurgeTransaction_Call_CF_CFDP_ResetTransaction_AndReturn_CLIST_CONT { /* Arrange */ CF_Transaction_t dummy_t; - clist_node arg_n = &dummy_t.cl_node; + CF_CListNode_t *arg_n = &dummy_t.cl_node; int dummy_ignored; void *arg_ignored = &dummy_ignored; int local_result; @@ -2547,8 +2547,8 @@ void Test_CF_PurgeTransaction_Call_CF_CFDP_ResetTransaction_AndReturn_CLIST_CONT UtAssert_True(context_CF_CFDP_ResetTransaction.keep_history == 0, "CF_CFDP_ResetTransaction received keep_history %u and should be 0 (constant)", context_CF_CFDP_ResetTransaction.keep_history); - UtAssert_True(local_result == CLIST_CONT, "CF_PurgeHistory returned %d and should be %d (CLIST_CONT)", local_result, - CLIST_CONT); + UtAssert_True(local_result == CF_CLIST_CONT, "CF_PurgeHistory returned %d and should be %d (CF_CLIST_CONT)", + local_result, CF_CLIST_CONT); } /* end Test_CF_PurgeHistory_Call_CF_CFDP_ResetHistory_AndReturn_CLIST_CONT */ @@ -2565,8 +2565,8 @@ void Test_CF_DoPurgeQueue_PendOnly(void) CF_UT_cmd_unionargs_buf_t utbuf; cf_cmd_unionargs_t *arg_cmd = &utbuf.ua; CF_Channel_t *dummy_c; - clist_node_t dummy_start; - clist_node_t *expected_start = &dummy_start; + CF_CListNode_t dummy_start; + CF_CListNode_t *expected_start = &dummy_start; int local_result; CF_CList_Traverse_POINTER_context_t context_CF_CList_Traverse; @@ -2603,8 +2603,8 @@ void Test_CF_DoPurgeQueue_HistoryOnly(void) CF_UT_cmd_unionargs_buf_t utbuf; cf_cmd_unionargs_t *arg_cmd = &utbuf.ua; CF_Channel_t *dummy_c; - clist_node_t dummy_start; - clist_node_t *expected_start = &dummy_start; + CF_CListNode_t dummy_start; + CF_CListNode_t *expected_start = &dummy_start; int local_result; CF_CList_Traverse_POINTER_context_t context_CF_CList_Traverse; @@ -2628,8 +2628,8 @@ void Test_CF_DoPurgeQueue_HistoryOnly(void) /* Assert */ UtAssert_STUB_COUNT(CF_CList_Traverse, 1); UtAssert_ADDRESS_EQ(context_CF_CList_Traverse.start, expected_start); - UtAssert_True(context_CF_CList_Traverse.fn == (clist_fn_t)CF_PurgeHistory, - "context_CF_CList_Traverse.fn == (clist_fn_t)CF_PurgeHistory"); + UtAssert_True(context_CF_CList_Traverse.fn == (CF_CListFn_t)CF_PurgeHistory, + "context_CF_CList_Traverse.fn == (CF_CListFn_t )CF_PurgeHistory"); UtAssert_ADDRESS_EQ(context_CF_CList_Traverse.context, dummy_c); UtAssert_True(local_result == 0, "CF_DoPurgeQueue returned %d and should be 0", local_result); } /* end Test_CF_DoPurgeQueue_HistoryOnly */ @@ -2641,10 +2641,10 @@ void Test_CF_DoPurgeQueue_Both(void) CF_UT_cmd_unionargs_buf_t utbuf; cf_cmd_unionargs_t *arg_cmd = &utbuf.ua; CF_Channel_t *dummy_c; - clist_node_t dummy_pend_start; - clist_node_t *expected_pend_start = &dummy_pend_start; - clist_node_t dummy_history_start; - clist_node_t *expected_history_start = &dummy_history_start; + CF_CListNode_t dummy_pend_start; + CF_CListNode_t *expected_pend_start = &dummy_pend_start; + CF_CListNode_t dummy_history_start; + CF_CListNode_t *expected_history_start = &dummy_history_start; int local_result; CF_CList_Traverse_POINTER_context_t context_CF_CList_Traverse[2]; @@ -2673,8 +2673,8 @@ void Test_CF_DoPurgeQueue_Both(void) "context_CF_CList_Traverse[0].fn == CF_PurgeTransaction"); UtAssert_ADDRESS_EQ(context_CF_CList_Traverse[0].context, NULL); UtAssert_ADDRESS_EQ(context_CF_CList_Traverse[1].start, expected_history_start); - UtAssert_True(context_CF_CList_Traverse[1].fn == (clist_fn_t)CF_PurgeHistory, - "context_CF_CList_Traverse[1].fn == (clist_fn_t)CF_PurgeHistory"); + UtAssert_True(context_CF_CList_Traverse[1].fn == (CF_CListFn_t)CF_PurgeHistory, + "context_CF_CList_Traverse[1].fn == (CF_CListFn_t )CF_PurgeHistory"); UtAssert_ADDRESS_EQ(context_CF_CList_Traverse[1].context, dummy_c); UtAssert_True(local_result == 0, "CF_DoPurgeQueue returned %d and should be 0", local_result); } /* end Test_CF_DoPurgeQueue_Both */ diff --git a/unit-test/cf_utils_tests.c b/unit-test/cf_utils_tests.c index 8a1c48a8..c0f49ded 100644 --- a/unit-test/cf_utils_tests.c +++ b/unit-test/cf_utils_tests.c @@ -91,7 +91,7 @@ void Test_cf_dequeue_transaction_AssertsBecause_t_chan_num_LessThan_CF_NUM_CHANN { // /* Arrange */ // CF_Transaction_t arg_t; - // clist_node *expected_qs = + // CF_CListNode_t * *expected_qs = // &CF_AppData.engine.channels[arg_t.chan_num].qs[arg_t.flags.com.q_index]; // uint8 dummy_chan_num = // Any_uint8_GreaterThan_or_EqualTo(CF_NUM_CHANNELS); @@ -124,8 +124,8 @@ void Test_cf_dequeue_transaction_Call_CF_CList_Remove_AndDecrement_q_size(void) /* Arrange */ CF_Transaction_t arg_t; uint8 dummy_chan_num = Any_uint8_LessThan(CF_NUM_CHANNELS); - clist_node *expected_head; - clist_node expected_cl_node; + CF_CListNode_t **expected_head; + CF_CListNode_t *expected_cl_node; uint16 initial_q_size = Any_uint16_Except(0); /* 0 will CF_Assert */ CF_Clist_Remove_context_t context_clist_remove; @@ -191,10 +191,10 @@ void Test_cf_move_transaction_Call_CF_CList_InsertBack_AndSet_q_index_ToGiven_q( CF_Transaction_t dummy_t; CF_Transaction_t *arg_t = &dummy_t; uint8 dummy_chan_num = Any_uint8_LessThan(CF_NUM_CHANNELS); - clist_node *expected_remove_head; - clist_node expected_remove_node; - clist_node *expected_insert_back_head; - clist_node expected_insert_back_node; + CF_CListNode_t **expected_remove_head; + CF_CListNode_t *expected_remove_node; + CF_CListNode_t **expected_insert_back_head; + CF_CListNode_t *expected_insert_back_node; CF_QueueIdx_t arg_q = Any_cf_queue_index_t(); arg_t->chan_num = dummy_chan_num; @@ -241,9 +241,9 @@ void Test_CF_CList_Remove_Ex_AssertsBecause_q_size_Eq0(void) // CF_Channel_t dummy_c; // CF_Channel_t* arg_c = &dummy_c; // CF_QueueIdx_t arg_index = Any_cf_queue_index_t(); - // clist_node arg_node; - // clist_node* expected_remove_head; - // clist_node expected_remove_node; + // CF_CListNode_t * arg_node; + // CF_CListNode_t ** expected_remove_head; + // CF_CListNode_t * expected_remove_node; // CF_Clist_Remove_context_t context_clist_remove; // UT_SetDataBuffer(UT_KEY(CF_CList_Remove), &context_clist_remove, @@ -263,13 +263,13 @@ void Test_CF_CList_Remove_Ex_AssertsBecause_q_size_Eq0(void) void Test_CF_CList_Remove_Ex_Call_CF_CList_Remove_AndDecrement_q_size(void) { /* Arrange */ - CF_Channel_t *arg_c = &CF_AppData.engine.channels[Any_uint32_LessThan(CF_NUM_CHANNELS)]; - CF_QueueIdx_t arg_index = Any_cf_queue_index_t(); - clist_node_t dummy_node; - clist_node arg_node = &dummy_node; - clist_node *expected_remove_head; - clist_node expected_remove_node; - uint16 initial_q_size = Any_uint16_Except(0); + CF_Channel_t *arg_c = &CF_AppData.engine.channels[Any_uint32_LessThan(CF_NUM_CHANNELS)]; + CF_QueueIdx_t arg_index = Any_cf_queue_index_t(); + CF_CListNode_t dummy_node; + CF_CListNode_t *arg_node = &dummy_node; + CF_CListNode_t **expected_remove_head; + CF_CListNode_t *expected_remove_node; + uint16 initial_q_size = Any_uint16_Except(0); CF_Clist_Remove_context_t context_clist_remove; UT_SetDataBuffer(UT_KEY(CF_CList_Remove), &context_clist_remove, sizeof(context_clist_remove), false); @@ -300,14 +300,14 @@ void Test_CF_CList_Remove_Ex_Call_CF_CList_Remove_AndDecrement_q_size(void) void Test_CF_CList_InsertAfter_Ex_Call_CF_CList_InsertAfter_AndIncrement_q_size(void) { /* Arrange */ - CF_Channel_t *arg_c = &CF_AppData.engine.channels[Any_uint32_LessThan(CF_NUM_CHANNELS)]; - CF_QueueIdx_t arg_index = Any_cf_queue_index_t(); - clist_node_t dummy_start; - clist_node arg_start = &dummy_start; - clist_node_t dummy_after; - clist_node arg_after = &dummy_after; - uint16 initial_q_size = Any_uint16(); - clist_node *expected_insert_after_head = &arg_c->qs[arg_index]; + CF_Channel_t *arg_c = &CF_AppData.engine.channels[Any_uint32_LessThan(CF_NUM_CHANNELS)]; + CF_QueueIdx_t arg_index = Any_cf_queue_index_t(); + CF_CListNode_t dummy_start; + CF_CListNode_t *arg_start = &dummy_start; + CF_CListNode_t dummy_after; + CF_CListNode_t *arg_after = &dummy_after; + uint16 initial_q_size = Any_uint16(); + CF_CListNode_t **expected_insert_after_head = &arg_c->qs[arg_index]; CF_CList_InsertAfter_context_t context_CF_CList_InsertAfter; UT_SetDataBuffer(UT_KEY(CF_CList_InsertAfter), &context_CF_CList_InsertAfter, sizeof(context_CF_CList_InsertAfter), @@ -337,13 +337,13 @@ void Test_CF_CList_InsertAfter_Ex_Call_CF_CList_InsertAfter_AndIncrement_q_size( void Test_CF_CList_InsertBack_Ex_Call_CF_CList_InsertBack_AndIncrement_q_size(void) { /* Arrange */ - CF_Channel_t *arg_c = &CF_AppData.engine.channels[Any_uint32_LessThan(CF_NUM_CHANNELS)]; - CF_QueueIdx_t arg_index = Any_cf_queue_index_t(); - clist_node_t dummy_node; - clist_node arg_node = &dummy_node; - uint16 initial_q_size = Any_uint16(); - clist_node *expected_insert_back_head; - clist_node expected_insert_back_node; + CF_Channel_t *arg_c = &CF_AppData.engine.channels[Any_uint32_LessThan(CF_NUM_CHANNELS)]; + CF_QueueIdx_t arg_index = Any_cf_queue_index_t(); + CF_CListNode_t dummy_node; + CF_CListNode_t *arg_node = &dummy_node; + uint16 initial_q_size = Any_uint16(); + CF_CListNode_t **expected_insert_back_head; + CF_CListNode_t *expected_insert_back_node; CF_CList_InsertBack_context_t context_clist_insert_back; UT_SetDataBuffer(UT_KEY(CF_CList_InsertBack), &context_clist_insert_back, sizeof(context_clist_insert_back), false); @@ -381,7 +381,7 @@ void Test_CF_TraverseHistory_AssertsBecause_h_dir_GreaterThan_CF_DIR_NUM(void) { // /* Arrange */ // CF_History_t dummy_h; - // clist_node arg_n = &dummy_h.cl_node; + // CF_CListNode_t * arg_n = &dummy_h.cl_node; // trav_arg_t dummy_context; // trav_arg_t* arg_context = &dummy_context; // @@ -402,13 +402,13 @@ void Test_CF_TraverseHistory_AssertsBecause_h_dir_GreaterThan_CF_DIR_NUM(void) void Test_CF_TraverseHistory_When_CF_WrappedWrite_FailsFirstCallReturn_CLIST_EXIT(void) { /* Arrange */ - CF_History_t dummy_h; - clist_node arg_n = &dummy_h.cl_node; - trav_arg_t dummy_context; - trav_arg_t *arg_context = &dummy_context; - char src_colon_str[6] = "SRC: "; /* duplicates function value */ - uint8 dummy_len; - int local_result; + CF_History_t dummy_h; + CF_CListNode_t *arg_n = &dummy_h.cl_node; + trav_arg_t dummy_context; + trav_arg_t *arg_context = &dummy_context; + char src_colon_str[6] = "SRC: "; /* duplicates function value */ + uint8 dummy_len; + int local_result; dummy_h.src_eid = Any_uint8(); dummy_h.seq_num = Any_uint32(); @@ -434,23 +434,24 @@ void Test_CF_TraverseHistory_When_CF_WrappedWrite_FailsFirstCallReturn_CLIST_EXI CF_EID_ERR_CMD_WHIST_WRITE); UtAssert_True(arg_context->result == 1, "CF_TraverseHistory set context.result to %d and should be 1", arg_context->result); - UtAssert_True(local_result == CLIST_EXIT, "CF_TraverseHistory returned 0x%08X and should be 0x%08X (CLIST_EXIT)", - local_result, CLIST_EXIT); + UtAssert_True(local_result == CF_CLIST_EXIT, + "CF_TraverseHistory returned 0x%08X and should be 0x%08X (CF_CLIST_EXIT)", local_result, + CF_CLIST_EXIT); } /* end Test_CF_TraverseHistory_When_CF_WrappedWrite_FailsFirstCallReturn_CLIST_EXIT */ void Test_CF_TraverseHistory_When_CF_WrappedWrite_FailsSecondCallReturn_CLIST_EXIT(void) { /* Arrange */ - CF_History_t dummy_h; - clist_node arg_n = &dummy_h.cl_node; - trav_arg_t dummy_context; - trav_arg_t *arg_context = &dummy_context; - char src_colon_str[6] = "SRC: "; /* duplicates function value */ - char dst_colon_str[6] = "DST: "; /* duplicates function value */ - uint8 dummy_len_src; - uint8 dummy_len_dst; - int local_result; + CF_History_t dummy_h; + CF_CListNode_t *arg_n = &dummy_h.cl_node; + trav_arg_t dummy_context; + trav_arg_t *arg_context = &dummy_context; + char src_colon_str[6] = "SRC: "; /* duplicates function value */ + char dst_colon_str[6] = "DST: "; /* duplicates function value */ + uint8 dummy_len_src; + uint8 dummy_len_dst; + int local_result; dummy_h.src_eid = Any_uint8(); dummy_h.seq_num = Any_uint32(); @@ -478,23 +479,24 @@ void Test_CF_TraverseHistory_When_CF_WrappedWrite_FailsSecondCallReturn_CLIST_EX CF_EID_ERR_CMD_WHIST_WRITE); UtAssert_True(arg_context->result == 1, "CF_TraverseHistory set context.result to %d and should be 1", arg_context->result); - UtAssert_True(local_result == CLIST_EXIT, "CF_TraverseHistory returned 0x%08X and should be 0x%08X (CLIST_EXIT)", - local_result, CLIST_EXIT); + UtAssert_True(local_result == CF_CLIST_EXIT, + "CF_TraverseHistory returned 0x%08X and should be 0x%08X (CF_CLIST_EXIT)", local_result, + CF_CLIST_EXIT); } /* end Test_CF_TraverseHistory_When_CF_WrappedWrite_FailsSecondCallReturn_CLIST_EXIT */ void Test_CF_TraverseHistory_WhenBothWrappedWritesSuccessfulReturn_CLIST_CONT(void) { /* Arrange */ - CF_History_t dummy_h; - clist_node arg_n = &dummy_h.cl_node; - trav_arg_t dummy_context; - trav_arg_t *arg_context = &dummy_context; - char src_colon_str[6] = "SRC: "; /* duplicates function value */ - char dst_colon_str[6] = "DST: "; /* duplicates function value */ - uint8 dummy_len_src; - uint8 dummy_len_dst; - int local_result; + CF_History_t dummy_h; + CF_CListNode_t *arg_n = &dummy_h.cl_node; + trav_arg_t dummy_context; + trav_arg_t *arg_context = &dummy_context; + char src_colon_str[6] = "SRC: "; /* duplicates function value */ + char dst_colon_str[6] = "DST: "; /* duplicates function value */ + uint8 dummy_len_src; + uint8 dummy_len_dst; + int local_result; dummy_h.src_eid = Any_uint8(); dummy_h.seq_num = Any_uint32(); @@ -520,8 +522,9 @@ void Test_CF_TraverseHistory_WhenBothWrappedWritesSuccessfulReturn_CLIST_CONT(vo UtAssert_STUB_COUNT(CFE_EVS_SendEvent, 0); UtAssert_True(arg_context->result == 0, "CF_TraverseHistory context.result is %d and should be 0", arg_context->result); - UtAssert_True(local_result == CLIST_CONT, "CF_TraverseHistory returned 0x%08X and should be 0x%08X (CLIST_CONT)", - local_result, CLIST_CONT); + UtAssert_True(local_result == CF_CLIST_CONT, + "CF_TraverseHistory returned 0x%08X and should be 0x%08X (CF_CLIST_CONT)", local_result, + CF_CLIST_CONT); } /* end Test_CF_TraverseHistory_WhenBothWrappedWritesSuccessfulReturn_CLIST_CONT */ @@ -538,7 +541,7 @@ void Test_CF_TraverseTransactions_When_context_result_Is_1_Return_CLIST_EXIT(voi /* Arrange */ CF_History_t dummy_history; CF_Transaction_t dummy_t; - clist_node arg_n = &dummy_t.cl_node; + CF_CListNode_t *arg_n = &dummy_t.cl_node; trav_arg_t dummy_context; trav_arg_t *arg_context = &dummy_context; int local_result; @@ -564,8 +567,8 @@ void Test_CF_TraverseTransactions_When_context_result_Is_1_Return_CLIST_EXIT(voi local_result = CF_TraverseTransactions(arg_n, arg_context); /* Assert */ - UtAssert_True(local_result == CLIST_EXIT, "CF_TraverseTransactions returned %d and should be %d (CLIST_EXIT)", - local_result, CLIST_EXIT); + UtAssert_True(local_result == CF_CLIST_EXIT, "CF_TraverseTransactions returned %d and should be %d (CF_CLIST_EXIT)", + local_result, CF_CLIST_EXIT); } /* end Test_CF_TraverseTransactions_When_context_result_Is_1_Return_CLIST_EXIT */ void Test_CF_TraverseTransactions_When_context_result_Is_0_Return_CLIST_CONT(void) @@ -573,7 +576,7 @@ void Test_CF_TraverseTransactions_When_context_result_Is_0_Return_CLIST_CONT(voi /* Arrange */ CF_History_t dummy_history; CF_Transaction_t dummy_t; - clist_node arg_n = &dummy_t.cl_node; + CF_CListNode_t *arg_n = &dummy_t.cl_node; trav_arg_t dummy_context; trav_arg_t *arg_context = &dummy_context; int local_result; @@ -604,8 +607,8 @@ void Test_CF_TraverseTransactions_When_context_result_Is_0_Return_CLIST_CONT(voi local_result = CF_TraverseTransactions(arg_n, arg_context); /* Assert */ - UtAssert_True(local_result == CLIST_CONT, "CF_TraverseTransactions returned %d and should be %d (CLIST_CONT)", - local_result, CLIST_CONT); + UtAssert_True(local_result == CF_CLIST_CONT, "CF_TraverseTransactions returned %d and should be %d (CF_CLIST_CONT)", + local_result, CF_CLIST_CONT); } /* end Test_CF_TraverseTransactions_When_context_result_Is_0_Return_CLIST_CONT */ /* end CF_TraverseTransactions tests */ @@ -619,13 +622,13 @@ void Test_CF_TraverseTransactions_When_context_result_Is_0_Return_CLIST_CONT(voi void Test_CF_WriteQueueDataToFile_Call_CF_CList_Traverse_AndReturn_arg_result(void) { /* Arrange */ - int32 arg_fd = Any_int32(); - CF_Channel_t dummy_c; - CF_Channel_t *arg_c = &dummy_c; - CF_QueueIdx_t arg_q = Any_cf_queue_index_t(); - clist_node_t dummy_node; - clist_node expected_start = &dummy_node; - clist_fn_t expected_fn = (clist_fn_t)CF_TraverseTransactions; + int32 arg_fd = Any_int32(); + CF_Channel_t dummy_c; + CF_Channel_t *arg_c = &dummy_c; + CF_QueueIdx_t arg_q = Any_cf_queue_index_t(); + CF_CListNode_t dummy_node; + CF_CListNode_t *expected_start = &dummy_node; + CF_CListFn_t expected_fn = (CF_CListFn_t)CF_TraverseTransactions; CF_CList_Traverse_TRAV_ARG_T_context_t context_clist_traverse; @@ -662,13 +665,13 @@ void Test_CF_WriteQueueDataToFile_Call_CF_CList_Traverse_AndReturn_arg_result(vo void Test_CF_WriteHistoryQueueDataToFile_Call_CF_CList_Traverse_AndReturn_arg_result(void) { /* Arrange */ - int32 arg_fd = Any_int32(); - CF_Channel_t dummy_c; - CF_Channel_t *arg_c = &dummy_c; - CF_Direction_t arg_dir = Any_direction_t(); - clist_node_t dummy_node; - clist_node expected_start = &dummy_node; - clist_fn_t expected_fn = (clist_fn_t)CF_TraverseHistory; + int32 arg_fd = Any_int32(); + CF_Channel_t dummy_c; + CF_Channel_t *arg_c = &dummy_c; + CF_Direction_t arg_dir = Any_direction_t(); + CF_CListNode_t dummy_node; + CF_CListNode_t *expected_start = &dummy_node; + CF_CListFn_t expected_fn = (CF_CListFn_t)CF_TraverseHistory; CF_CList_Traverse_TRAV_ARG_T_context_t context_clist_traverse; @@ -708,7 +711,7 @@ void Test_CF_PrioSearch_When_t_PrioIsGreaterThanContextPrioReturn_CLIST_CONT(voi { /* Arrange */ CF_Transaction_t dummy_t; - clist_node arg_node = &dummy_t.cl_node; + CF_CListNode_t *arg_node = &dummy_t.cl_node; priority_arg_t dummy_p; void *arg_context = (void *)&dummy_p; @@ -719,7 +722,8 @@ void Test_CF_PrioSearch_When_t_PrioIsGreaterThanContextPrioReturn_CLIST_CONT(voi result = CF_PrioSearch(arg_node, arg_context); /* Assert */ - UtAssert_True(result == CLIST_CONT, "CF_PrioSearch returned %d and should be %d (CLIST_CONT)", result, CLIST_CONT); + UtAssert_True(result == CF_CLIST_CONT, "CF_PrioSearch returned %d and should be %d (CF_CLIST_CONT)", result, + CF_CLIST_CONT); } /* end Test_CF_PrioSearch_When_t_PrioIsGreaterThanContextPrioReturn_CLIST_CONT */ @@ -727,7 +731,7 @@ void Test_CF_PrioSearch_When_t_PrioIsEqToContextPrio_Set_context_t_To_t_AndRetur { /* Arrange */ CF_Transaction_t dummy_t; - clist_node arg_node = &dummy_t.cl_node; + CF_CListNode_t *arg_node = &dummy_t.cl_node; priority_arg_t dummy_p; void *arg_context = (void *)&dummy_p; @@ -739,7 +743,8 @@ void Test_CF_PrioSearch_When_t_PrioIsEqToContextPrio_Set_context_t_To_t_AndRetur result = CF_PrioSearch(arg_node, arg_context); /* Assert */ - UtAssert_True(result == CLIST_EXIT, "CF_PrioSearch returned %d and should be %d (CLIST_EXIT)", result, CLIST_EXIT); + UtAssert_True(result == CF_CLIST_EXIT, "CF_PrioSearch returned %d and should be %d (CF_CLIST_EXIT)", result, + CF_CLIST_EXIT); UtAssert_ADDRESS_EQ(dummy_p.t, &dummy_t); } /* end Test_CF_PrioSearch_When_t_PrioIsEqToContextPrio_Set_context_t_To_t_AndReturn_CLIST_EXIT */ @@ -748,7 +753,7 @@ void Test_CF_PrioSearch_When_t_PrioIsLessThanContextPrio_Set_context_t_To_t_AndR { /* Arrange */ CF_Transaction_t dummy_t; - clist_node arg_node = &dummy_t.cl_node; + CF_CListNode_t *arg_node = &dummy_t.cl_node; priority_arg_t dummy_p; void *arg_context = (void *)&dummy_p; @@ -760,7 +765,8 @@ void Test_CF_PrioSearch_When_t_PrioIsLessThanContextPrio_Set_context_t_To_t_AndR result = CF_PrioSearch(arg_node, arg_context); /* Assert */ - UtAssert_True(result == CLIST_EXIT, "CF_PrioSearch returned %d and should be %d (CLIST_EXIT)", result, CLIST_EXIT); + UtAssert_True(result == CF_CLIST_EXIT, "CF_PrioSearch returned %d and should be %d (CF_CLIST_EXIT)", result, + CF_CLIST_EXIT); UtAssert_ADDRESS_EQ(dummy_p.t, &dummy_t); } /* end Test_CF_PrioSearch_When_t_PrioIsLessThanContextPrio_Set_context_t_To_t_AndReturn_CLIST_EXIT */ @@ -800,8 +806,8 @@ void Test_CF_InsertSortPrio_Call_CF_CList_InsertBack_Ex_ListIsEmpty_AndSet_q_ind CF_Transaction_t *arg_t = &dummy_t; CF_QueueIdx_t arg_q = Any_cf_queue_index_t(); CF_Channel_t *dummy_c; - clist_node *expected_insert_back_head; - clist_node expected_insert_back_node; + CF_CListNode_t **expected_insert_back_head; + CF_CListNode_t *expected_insert_back_node; /* dummy_t settings to bypass CF_Assert */ dummy_t.chan_num = Any_uint8_LessThan(CF_NUM_CHANNELS); @@ -837,13 +843,13 @@ void Test_CF_InsertSortPrio_Call_CF_CList_InsertAfter_Ex_AndSet_q_index_To_q(voi CF_Transaction_t dummy_t; CF_Transaction_t *arg_t = &dummy_t; CF_QueueIdx_t arg_q = Any_cf_queue_index_t(); - clist_node dummy_qs; + CF_CListNode_t *dummy_qs; CF_Channel_t *dummy_c; - clist_node expected_end; - clist_fn_t expected_fn; - clist_node *expected_insert_after_head; - clist_node *expected_insert_after_start; - clist_node *expected_insert_after_after; + CF_CListNode_t *expected_end; + CF_CListFn_t expected_fn; + CF_CListNode_t **expected_insert_after_head; + CF_CListNode_t **expected_insert_after_start; + CF_CListNode_t **expected_insert_after_after; CF_CList_Traverse_R_context_t context_cf_clist_traverse_r; UT_SetDataBuffer(UT_KEY(CF_CList_Traverse_R), &context_cf_clist_traverse_r, sizeof(context_cf_clist_traverse_r), @@ -856,7 +862,7 @@ void Test_CF_InsertSortPrio_Call_CF_CList_InsertAfter_Ex_AndSet_q_index_To_q(voi /* setting (&CF_AppData.engine.channels[arg_t->chan_num])->qs[arg_q] to * &dummy_qs makes the list NOT empty */ dummy_c = &CF_AppData.engine.channels[arg_t->chan_num]; - dummy_c->qs[arg_q] = (clist_node)&dummy_qs; + dummy_c->qs[arg_q] = (CF_CListNode_t *)&dummy_qs; /* setup priority_arg_t altered value */ context_cf_clist_traverse_r.context_t = &dummy_p_t; @@ -869,9 +875,9 @@ void Test_CF_InsertSortPrio_Call_CF_CList_InsertAfter_Ex_AndSet_q_index_To_q(voi /* set expected values */ expected_end = dummy_c->qs[arg_q]; expected_fn = CF_PrioSearch; - expected_insert_after_head = (clist_node *)&dummy_c->qs[arg_q]; - expected_insert_after_start = (clist_node *)&dummy_p_t.cl_node; - expected_insert_after_after = (clist_node *)&arg_t->cl_node; + expected_insert_after_head = (CF_CListNode_t **)&dummy_c->qs[arg_q]; + expected_insert_after_start = (CF_CListNode_t **)&dummy_p_t.cl_node; + expected_insert_after_after = (CF_CListNode_t **)&arg_t->cl_node; /* Act */ CF_InsertSortPrio(arg_t, arg_q); @@ -881,9 +887,9 @@ void Test_CF_InsertSortPrio_Call_CF_CList_InsertAfter_Ex_AndSet_q_index_To_q(voi UtAssert_ADDRESS_EQ(context_cf_clist_traverse_r.end, expected_end); UtAssert_True(context_cf_clist_traverse_r.fn == expected_fn, "context_cf_clist_traverse_r.fn == expected_fn"); UtAssert_STUB_COUNT(CF_CList_InsertAfter, 1); - UtAssert_ADDRESS_EQ(context_CF_CList_InsertAfter.head, (clist_node *)expected_insert_after_head); - UtAssert_ADDRESS_EQ(context_CF_CList_InsertAfter.start, (clist_node)expected_insert_after_start); - UtAssert_ADDRESS_EQ(context_CF_CList_InsertAfter.after, (clist_node)expected_insert_after_after); + UtAssert_ADDRESS_EQ(context_CF_CList_InsertAfter.head, (CF_CListNode_t **)expected_insert_after_head); + UtAssert_ADDRESS_EQ(context_CF_CList_InsertAfter.start, (CF_CListNode_t *)expected_insert_after_start); + UtAssert_ADDRESS_EQ(context_CF_CList_InsertAfter.after, (CF_CListNode_t *)expected_insert_after_after); UtAssert_True(arg_t->flags.com.q_index == arg_q, "t->flags.com.q_index is %u and should be %u (q)", arg_t->flags.com.q_index, arg_q); @@ -895,12 +901,12 @@ void Test_CF_InsertSortPrio_When_p_t_Is_NULL_Call_CF_CList_InsertBack_Ex(void) CF_Transaction_t dummy_t; CF_Transaction_t *arg_t = &dummy_t; CF_QueueIdx_t arg_q = Any_cf_queue_index_t(); - clist_node dummy_qs; + CF_CListNode_t *dummy_qs; CF_Channel_t *dummy_c; - clist_node expected_end; - clist_fn_t expected_fn; - clist_node *expected_insert_back_head; - clist_node expected_insert_back_node; + CF_CListNode_t *expected_end; + CF_CListFn_t expected_fn; + CF_CListNode_t **expected_insert_back_head; + CF_CListNode_t *expected_insert_back_node; CF_CList_Traverse_R_context_t context_cf_clist_traverse_r; UT_SetDataBuffer(UT_KEY(CF_CList_Traverse_R), &context_cf_clist_traverse_r, sizeof(context_cf_clist_traverse_r), @@ -913,7 +919,7 @@ void Test_CF_InsertSortPrio_When_p_t_Is_NULL_Call_CF_CList_InsertBack_Ex(void) /* setting (&CF_AppData.engine.channels[arg_t->chan_num])->qs[arg_q] to * &dummy_qs makes the list NOT empty */ dummy_c = &CF_AppData.engine.channels[arg_t->chan_num]; - dummy_c->qs[arg_q] = (clist_node)&dummy_qs; + dummy_c->qs[arg_q] = (CF_CListNode_t *)&dummy_qs; /* setup priority_arg_t altered value */ context_cf_clist_traverse_r.context_t = NULL; @@ -956,7 +962,7 @@ void Test_CF_TraverseAllTransactions__GetContainer_t_Call_args_fn_AndAdd_1_ToCou { /* Arrange */ CF_Transaction_t dummy_t; - clist_node arg_n = &dummy_t.cl_node; + CF_CListNode_t *arg_n = &dummy_t.cl_node; traverse_all_args_t dummy_args; traverse_all_args_t *arg_args; int dummy_context_val; @@ -989,8 +995,8 @@ void Test_CF_TraverseAllTransactions__GetContainer_t_Call_args_fn_AndAdd_1_ToCou UtAssert_True(arg_args->counter == initial_args_counter + 1, "CF_TraverseAllTransactions_ set args->counter to %d which is 1 more than initial value %d", arg_args->counter, initial_args_counter); - UtAssert_True(result == CLIST_CONT, "CF_TraverseAllTransactions_ returned %d and should be %d (CLIST_CONT)", result, - CLIST_CONT); + UtAssert_True(result == CF_CLIST_CONT, "CF_TraverseAllTransactions_ returned %d and should be %d (CF_CLIST_CONT)", + result, CF_CLIST_CONT); } /* end Test_CF_TraverseAllTransactions__GetContainer_t_Call_args_fn_AndAdd_1_ToCounter */ @@ -1003,19 +1009,19 @@ void Test_CF_TraverseAllTransactions__GetContainer_t_Call_args_fn_AndAdd_1_ToCou void Test_CF_TraverseAllTransactions_CallOtherFunction_CF_Q_RX_TimesAndReturn_args_counter(void) { /* Arrange */ - CF_Channel_t dummy_c; - CF_Channel_t *arg_c; - int dummy_context; - void *arg_context = &dummy_context; - uint8 expected_count = CF_QueueIdx_RX - CF_QueueIdx_PEND + 1; - clist_node expected_qs_nodes[expected_count]; + CF_Channel_t dummy_c; + CF_Channel_t *arg_c; + int dummy_context; + void *arg_context = &dummy_context; + uint8 expected_count = CF_QueueIdx_RX - CF_QueueIdx_PEND + 1; + CF_CListNode_t *expected_qs_nodes[expected_count]; CF_TraverseAllTransactions_fn_t arg_fn = DummyFunctionFor_CF_TraverseAllTransactions_; int i = 0; for (i = 0; i < expected_count; ++i) { - dummy_c.qs[i] = (clist_node)&expected_qs_nodes[i]; + dummy_c.qs[i] = (CF_CListNode_t *)&expected_qs_nodes[i]; } /* set context */ @@ -1034,9 +1040,9 @@ void Test_CF_TraverseAllTransactions_CallOtherFunction_CF_Q_RX_TimesAndReturn_ar /* Assert */ for (i = 0; i < expected_count; ++i) { - UtAssert_ADDRESS_EQ(contexts_cf_clist_traverse[i].start, (clist_node)&expected_qs_nodes[i]); - UtAssert_True(contexts_cf_clist_traverse[i].fn == (clist_fn_t)CF_TraverseAllTransactions_, - "contexts_cf_clist_traverse[i].fn == (clist_fn_t) CF_TraverseAllTransactions_"); + UtAssert_ADDRESS_EQ(contexts_cf_clist_traverse[i].start, (CF_CListNode_t *)&expected_qs_nodes[i]); + UtAssert_True(contexts_cf_clist_traverse[i].fn == (CF_CListFn_t)CF_TraverseAllTransactions_, + "contexts_cf_clist_traverse[i].fn == (CF_CListFn_t ) CF_TraverseAllTransactions_"); UtAssert_True(contexts_cf_clist_traverse[i].context_fn == DummyFunctionFor_CF_TraverseAllTransactions_, "contexts_cf_clist_traverse[i].context_fn == DummyFunctionFor_CF_TraverseAllTransactions_"); UtAssert_ADDRESS_EQ(contexts_cf_clist_traverse[i].context_context, arg_context); diff --git a/unit-test/stubs/cf_cfdp_stubs.c b/unit-test/stubs/cf_cfdp_stubs.c index a59b786a..af1ec79f 100644 --- a/unit-test/stubs/cf_cfdp_stubs.c +++ b/unit-test/stubs/cf_cfdp_stubs.c @@ -247,7 +247,7 @@ void CF_CFDP_ResetHistory(CF_Channel_t *c, CF_History_t *h) ** \endreturns ** *************************************************************************/ -// static int CF_CFDP_FindTransactionBySequenceNumber_(clist_node n, trans_seq_arg_t *context) +// static int CF_CFDP_FindTransactionBySequenceNumber_(CF_CListNode_t * n, trans_seq_arg_t *context) // { // UtPrintf("NOT YET IMPLEMENTED stub in \n%s:line #%d\n", // __FILE__, __LINE__); @@ -839,7 +839,7 @@ int32 CF_CFDP_InitEngine(void) ** \endreturns ** *************************************************************************/ -// static int CF_CFDP_CycleTx_(clist_node node, void *context) +// static int CF_CFDP_CycleTx_(CF_CListNode_t * node, void *context) // { // UtPrintf("NOT YET IMPLEMENTED stub in \n%s:line #%d\n", // __FILE__, __LINE__); @@ -883,7 +883,7 @@ int32 CF_CFDP_InitEngine(void) ** \endreturns ** *************************************************************************/ -// static int CF_CFDP_DoTick(clist_node node, void *context) +// static int CF_CFDP_DoTick(CF_CListNode_t * node, void *context) // { // UtPrintf("NOT YET IMPLEMENTED stub in \n%s:line #%d\n", // __FILE__, __LINE__); @@ -1196,7 +1196,7 @@ void CF_CFDP_CancelTransaction(CF_Transaction_t *t) ** \retcode Always 0 indicate list traversal should not exit early. \endcode ** \endreturns *************************************************************************/ -// static int CF_CFDP_CloseFiles(clist_node n, void *context) +// static int CF_CFDP_CloseFiles(CF_CListNode_t * n, void *context) // { // UtPrintf("NOT YET IMPLEMENTED stub in \n%s:line #%d\n", // __FILE__, __LINE__); diff --git a/unit-test/stubs/cf_clist_stubs.c b/unit-test/stubs/cf_clist_stubs.c index b5893a82..16a8fe10 100644 --- a/unit-test/stubs/cf_clist_stubs.c +++ b/unit-test/stubs/cf_clist_stubs.c @@ -37,7 +37,7 @@ extern type_of_context_CF_CList_Traverse_t type_of_context_CF_CList_Traverse; ** node must not be NULL. ** *************************************************************************/ -void CF_CList_InitNode(clist_node node) +void CF_CList_InitNode(CF_CListNode_t *node) { UT_Stub_CopyFromLocal(UT_KEY(CF_CList_InitNode), &node, sizeof(node)); @@ -51,7 +51,7 @@ void CF_CList_InitNode(clist_node node) ** head must not be NULL. node must not be NULL. ** *************************************************************************/ -void CF_CList_InsertFront(clist_node *head, clist_node node) +void CF_CList_InsertFront(CF_CListNode_t **head, CF_CListNode_t *node) { UtPrintf("NOT YET IMPLEMENTED stub in \n%s:line #%d\n", __FILE__, __LINE__); exit(-86); @@ -64,7 +64,7 @@ void CF_CList_InsertFront(clist_node *head, clist_node node) ** head must not be NULL. node must not be NULL. ** *************************************************************************/ -void CF_CList_InsertBack(clist_node *head, clist_node node) +void CF_CList_InsertBack(CF_CListNode_t **head, CF_CListNode_t *node) { UT_Stub_CopyFromLocal(UT_KEY(CF_CList_InsertBack), &head, sizeof(head)); UT_Stub_CopyFromLocal(UT_KEY(CF_CList_InsertBack), &node, sizeof(node)); @@ -83,9 +83,9 @@ void CF_CList_InsertBack(clist_node *head, clist_node node) ** \endreturns ** *************************************************************************/ -clist_node CF_CList_Pop(clist_node *head) +CF_CListNode_t *CF_CList_Pop(CF_CListNode_t **head) { - clist_node forced_return; + CF_CListNode_t *forced_return; UT_Stub_CopyFromLocal(UT_KEY(CF_CList_Pop), &head, sizeof(head)); @@ -103,7 +103,7 @@ clist_node CF_CList_Pop(clist_node *head) ** head must not be NULL. node must not be NULL. ** *************************************************************************/ -void CF_CList_Remove(clist_node *head, clist_node node) +void CF_CList_Remove(CF_CListNode_t **head, CF_CListNode_t *node) { UT_Stub_CopyFromLocal(UT_KEY(CF_CList_Remove), &head, sizeof(head)); UT_Stub_CopyFromLocal(UT_KEY(CF_CList_Remove), &node, sizeof(node)); @@ -118,7 +118,7 @@ void CF_CList_Remove(clist_node *head, clist_node node) ** head must not be NULL. node must not be NULL. ** *************************************************************************/ -void CF_CList_InsertAfter(clist_node *head, clist_node start, clist_node after) +void CF_CList_InsertAfter(CF_CListNode_t **head, CF_CListNode_t *start, CF_CListNode_t *after) { UT_Stub_CopyFromLocal(UT_KEY(CF_CList_InsertAfter), &head, sizeof(head)); UT_Stub_CopyFromLocal(UT_KEY(CF_CList_InsertAfter), &start, sizeof(start)); @@ -135,7 +135,7 @@ void CF_CList_InsertAfter(clist_node *head, clist_node start, clist_node after) ** *************************************************************************/ -void CF_CList_Traverse(clist_node start, clist_fn_t fn, void *context) +void CF_CList_Traverse(CF_CListNode_t *start, CF_CListFn_t fn, void *context) { UT_Stub_CopyFromLocal(UT_KEY(CF_CList_Traverse), &start, sizeof(start)); UT_Stub_CopyFromLocal(UT_KEY(CF_CList_Traverse), &fn, sizeof(fn)); @@ -157,10 +157,10 @@ void CF_CList_Traverse(clist_node start, clist_fn_t fn, void *context) break; case TRAVERSE_ALL_ARGS_T: - // TODO: fn_size = sizeof(clist_fn_t) is cheating and an + // TODO: fn_size = sizeof(CF_CListFn_t ) is cheating and an // assumption the actual type I've seen as the context fn here is // CF_TraverseAllTransactions_fn_t and happens to be same size 8 - fn_size = sizeof(clist_fn_t); + fn_size = sizeof(CF_CListFn_t); UT_Stub_CopyFromLocal(UT_KEY(CF_CList_Traverse), context, fn_size); UT_Stub_CopyFromLocal(UT_KEY(CF_CList_Traverse), (uint8 *)context + fn_size, sizeof(void *)); // TODO: does the counter really need this behavior? all it is @@ -216,7 +216,7 @@ void CF_CList_Traverse(clist_node start, clist_fn_t fn, void *context) *************************************************************************/ #include "cf_cfdp.h" //TODO:this is to get CF_Transaction_t -- find a better way? -void CF_CList_Traverse_R(clist_node end, clist_fn_t fn, void *context) +void CF_CList_Traverse_R(CF_CListNode_t *end, CF_CListFn_t fn, void *context) { UT_Stub_CopyFromLocal(UT_KEY(CF_CList_Traverse_R), &end, sizeof(end)); UT_Stub_CopyFromLocal(UT_KEY(CF_CList_Traverse_R), &fn, sizeof(fn)); diff --git a/unit-test/stubs/cf_cmd_stubs.c b/unit-test/stubs/cf_cmd_stubs.c index c816decb..eb1b045e 100644 --- a/unit-test/stubs/cf_cmd_stubs.c +++ b/unit-test/stubs/cf_cmd_stubs.c @@ -491,7 +491,7 @@ typedef struct ** n must not be NULL. c must not be NULL. ** *************************************************************************/ -// static int CF_PurgeHistory(clist_node n, CF_Channel_t *c) +// static int CF_PurgeHistory(CF_CListNode_t * n, CF_Channel_t *c) // { // UtPrintf("NOT YET IMPLEMENTED stub in \n%s:line #%d\n", // __FILE__, __LINE__); @@ -505,7 +505,7 @@ typedef struct ** n must not be NULL. ** *************************************************************************/ -// static int CF_PurgeTransaction(clist_node n, void *ignored) +// static int CF_PurgeTransaction(CF_CListNode_t * n, void *ignored) // { // UtPrintf("NOT YET IMPLEMENTED stub in \n%s:line #%d\n", // __FILE__, __LINE__); diff --git a/unit-test/stubs/cf_utils_stubs.c b/unit-test/stubs/cf_utils_stubs.c index dfa8f4e2..5aed51c9 100644 --- a/unit-test/stubs/cf_utils_stubs.c +++ b/unit-test/stubs/cf_utils_stubs.c @@ -67,7 +67,7 @@ typedef struct ** \endreturns ** *************************************************************************/ -// static int CF_TraverseHistory(clist_node n, trav_arg_t *context) +// static int CF_TraverseHistory(CF_CListNode_t * n, trav_arg_t *context) // { // UtPrintf("NOT YET IMPLEMENTED stub in \n%s:line #%d\n", // __FILE__, __LINE__); @@ -86,7 +86,7 @@ typedef struct ** \endreturns ** *************************************************************************/ -// static int CF_TraverseTransactions(clist_node n, trav_arg_t *context) +// static int CF_TraverseTransactions(CF_CListNode_t * n, trav_arg_t *context) // { // UtPrintf("NOT YET IMPLEMENTED stub in \n%s:line #%d\n", // __FILE__, __LINE__); @@ -148,7 +148,7 @@ int32 CF_WriteHistoryQueueDataToFile(int32 fd, CF_Channel_t *c, CF_Direction_t d ** \endreturns ** *************************************************************************/ -// static int CF_PrioSearch(clist_node node, void *context) +// static int CF_PrioSearch(CF_CListNode_t * node, void *context) // { // UtPrintf("NOT YET IMPLEMENTED stub in \n%s:line #%d\n", // __FILE__, __LINE__); @@ -191,7 +191,7 @@ void CF_InsertSortPrio(CF_Transaction_t *t, CF_QueueIdx_t q) ** \endreturns ** *************************************************************************/ -// static int CF_TraverseAllTransactions_(clist_node n, traverse_all_args_t *args) +// static int CF_TraverseAllTransactions_(CF_CListNode_t * n, traverse_all_args_t *args) // { // UtPrintf("NOT YET IMPLEMENTED stub in \n%s:line #%d\n", // __FILE__, __LINE__); diff --git a/unit-test/utilities/cf_test_utils.h b/unit-test/utilities/cf_test_utils.h index f21d3f2f..d43cc69e 100644 --- a/unit-test/utilities/cf_test_utils.h +++ b/unit-test/utilities/cf_test_utils.h @@ -274,9 +274,9 @@ typedef struct typedef struct { - clist_node start; - clist_fn_t fn; - void *context; + CF_CListNode_t *start; + CF_CListFn_t fn; + void *context; } CF_PACK CF_CList_Traverse_POINTER_context_t; typedef struct @@ -371,8 +371,8 @@ typedef struct typedef struct { - clist_node *head; - clist_node node; + CF_CListNode_t **head; + CF_CListNode_t *node; } CF_PACK CF_CList_Remove_context_t; typedef struct @@ -404,20 +404,20 @@ typedef struct typedef struct { - clist_node *head; - clist_node forced_return; + CF_CListNode_t **head; + CF_CListNode_t *forced_return; } CF_PACK CF_CList_Pop_context_t; typedef struct { - clist_node *head; - clist_node node; + CF_CListNode_t **head; + CF_CListNode_t *node; } CF_PACK CF_CList_InsertBack_context_t; typedef struct { - clist_node start; - clist_fn_t fn; + CF_CListNode_t *start; + CF_CListFn_t fn; CF_TransactionSeq_t context_transaction_sequence_number; CF_EntityId_t context_src_eid; CF_Transaction_t *context_forced_t; /* out param */ @@ -425,37 +425,37 @@ typedef struct typedef struct { - clist_node start; - clist_fn_t fn; - void *context; + CF_CListNode_t *start; + CF_CListFn_t fn; + void *context; } CF_PACK CF_CList_Traverse_CLOSE_FILES_context_t; typedef struct { - clist_node *head; - clist_node node; + CF_CListNode_t **head; + CF_CListNode_t *node; } CF_PACK CF_Clist_Remove_context_t; typedef struct { - clist_node *head; - clist_node start; - clist_node after; + CF_CListNode_t **head; + CF_CListNode_t *start; + CF_CListNode_t *after; } CF_PACK CF_CList_InsertAfter_context_t; typedef struct { - clist_node start; - clist_fn_t fn; - int32 context_fd; - int32 context_result; - int32 context_counter; + CF_CListNode_t *start; + CF_CListFn_t fn; + int32 context_fd; + int32 context_result; + int32 context_counter; } CF_PACK CF_CList_Traverse_TRAV_ARG_T_context_t; typedef struct { - clist_node start; - clist_fn_t fn; + CF_CListNode_t *start; + CF_CListFn_t fn; CF_TraverseAllTransactions_fn_t context_fn; void *context_context; int context_counter; @@ -463,8 +463,8 @@ typedef struct typedef struct { - clist_node end; - clist_fn_t fn; + CF_CListNode_t *end; + CF_CListFn_t fn; CF_Transaction_t *context_t; } CF_PACK CF_CList_Traverse_R_context_t;