diff --git a/fsw/src/cf_cfdp_helpers.c b/fsw/src/cf_cfdp_helpers.c index 0d1bdb5fd..106573d04 100644 --- a/fsw/src/cf_cfdp_helpers.c +++ b/fsw/src/cf_cfdp_helpers.c @@ -187,8 +187,3 @@ int CF_HeaderSize(const pdu_header_t *ph) CF_Assert((eid_l > 0) && (tsn_l > 0)); return sizeof(pdu_header_t) + (2 * eid_l) + tsn_l; } - -void *CF_EndOfHeaderPtr(const pdu_header_t *ph) -{ - return (void *)(((uint8 *)ph) + CF_HeaderSize(ph)); -} diff --git a/fsw/src/cf_cfdp_pdu.h b/fsw/src/cf_cfdp_pdu.h index b4b7a2aae..e55fbaf53 100644 --- a/fsw/src/cf_cfdp_pdu.h +++ b/fsw/src/cf_cfdp_pdu.h @@ -54,12 +54,11 @@ typedef struct #endif } CF_PACK pdu_header_t; -extern int CF_GetMemcpySize(const uint8 *num, int size); -extern void CF_MemcpyToBE(uint8 *dst, const uint8 *src, int src_size, int dst_size); -extern int CF_GetVariableHeader(void); -extern void CF_SetVariableHeader(cf_entity_id_t src_eid, cf_entity_id_t dst_eid, cf_transaction_seq_t tsn); -extern void *CF_EndOfHeaderPtr(const pdu_header_t *ph); -extern int CF_HeaderSize(const pdu_header_t *ph); +extern int CF_GetMemcpySize(const uint8 *num, int size); +extern void CF_MemcpyToBE(uint8 *dst, const uint8 *src, int src_size, int dst_size); +extern int CF_GetVariableHeader(void); +extern void CF_SetVariableHeader(cf_entity_id_t src_eid, cf_entity_id_t dst_eid, cf_transaction_seq_t tsn); +extern int CF_HeaderSize(const pdu_header_t *ph); #define CF_MAX_HEADER_SIZE (sizeof(pdu_header_t) + (2 * sizeof(cf_entity_id_t)) + sizeof(cf_transaction_seq_t)) #define STATIC_CAST(ph, t) ((t *)(((uint8 *)ph) + CF_HeaderSize(ph))) diff --git a/unit-test/cf_cfdp_helpers_tests.c b/unit-test/cf_cfdp_helpers_tests.c index 8f6d9b74e..40cb536fd 100644 --- a/unit-test/cf_cfdp_helpers_tests.c +++ b/unit-test/cf_cfdp_helpers_tests.c @@ -1002,40 +1002,6 @@ void Test_CF_HeaderSize_Return_sizeof_pdu_header_t_Plus_2_Times_eid_l_Plus_tsn_l /* end CF_SetVariableHeader tests */ -/******************************************************************************* -** -** CF_EndOfHeaderPtr tests (simple) - full coverage - [unstubbables: CF_HeaderSize] -** -*******************************************************************************/ - -void Test_CF_EndOfHeaderPtr_Return_ph_PointerPlus_CF_HeaderSize_ph(void) -{ - /* Arrange */ - pdu_header_t dummy_ph; - pdu_header_t *arg_ph = &dummy_ph; - int32 forced_return_FGV_for_eid_l = Any_uint8_LessThan( - sizeof(cf_entity_id_t)); /* Any_uint8_LessThan(sizeof(cf_entity_id_t)) used for reasonable size */ - int32 forced_return_FGV_for_tsn_l = Any_uint8_LessThan( - sizeof(cf_transaction_seq_t)); /* Any_uint8_LessThan(sizeof(cf_transaction_seq_t)) used for reasonable size */ - void *expected_result = (uint8 *)arg_ph + sizeof(pdu_header_t) + (2 * (forced_return_FGV_for_eid_l + 1)) + - (forced_return_FGV_for_tsn_l + 1); /* each +1 added by CUT */ - void *local_result; - - /* Arrange for CF_HeaderSize */ - UT_SetDeferredRetcode(UT_KEY(FGV), 1, forced_return_FGV_for_eid_l); - UT_SetDeferredRetcode(UT_KEY(FGV), 1, forced_return_FGV_for_tsn_l); - - /* Act */ - local_result = CF_EndOfHeaderPtr(arg_ph); - - /* Assert */ - UtAssert_ADDRESS_EQ(local_result, expected_result); - /* Assert for CF_HeaderSize */ - UtAssert_STUB_COUNT(FGV, 2); -} /* end Test_CF_EndOfHeaderPtr_Return_ph_PointerPlus_CF_HeaderSize_ph */ - -/* end CF_EndOfHeaderPtr tests */ - /******************************************************************************* ** ** cf_cfdp_helpers_tests UtTest_Add groups @@ -1184,12 +1150,6 @@ void add_CF_HeaderSize_tests(void) "Test_CF_HeaderSize_Return_sizeof_pdu_header_t_Plus_2_Times_eid_l_Plus_tsn_l"); } /* end add_CF_HeaderSize_tests */ -void add_CF_EndOfHeaderPtr_tests(void) -{ - UtTest_Add(Test_CF_EndOfHeaderPtr_Return_ph_PointerPlus_CF_HeaderSize_ph, cf_cfdp_helpers_tests_Setup, - cf_cfdp_helpers_tests_Teardown, "Test_CF_EndOfHeaderPtr_Return_ph_PointerPlus_CF_HeaderSize_ph"); -} /* end add_CF_EndOfHeaderPtr_tests */ - /* end cf_cfdp_helpers_tests UtTest_Add groups */ /******************************************************************************* @@ -1218,8 +1178,6 @@ void UtTest_Setup(void) add_CF_HeaderSize_tests(); - add_CF_EndOfHeaderPtr_tests(); - } /* end UtTest_Setup for cf_cfdp_helpers_tests.c */ /* end cf_cfdp_helpers_tests.c */ diff --git a/unit-test/stubs/cf_cfdp_helpers_stubs.c b/unit-test/stubs/cf_cfdp_helpers_stubs.c index 97d132d52..a51405745 100644 --- a/unit-test/stubs/cf_cfdp_helpers_stubs.c +++ b/unit-test/stubs/cf_cfdp_helpers_stubs.c @@ -29,22 +29,6 @@ #include "utstubs.h" #include "utgenstub.h" -/* - * ---------------------------------------------------- - * Generated stub function for CF_EndOfHeaderPtr() - * ---------------------------------------------------- - */ -void *CF_EndOfHeaderPtr(const pdu_header_t *ph) -{ - UT_GenStub_SetupReturnBuffer(CF_EndOfHeaderPtr, void *); - - UT_GenStub_AddParam(CF_EndOfHeaderPtr, const pdu_header_t *, ph); - - UT_GenStub_Execute(CF_EndOfHeaderPtr, Basic, NULL); - - return UT_GenStub_GetReturnValue(CF_EndOfHeaderPtr, void *); -} - /* * ---------------------------------------------------- * Generated stub function for CF_GetMemcpySize()