Skip to content

Commit

Permalink
Merge pull request #81 from thnkslprpt/fix-80-remove-extraneous-assig…
Browse files Browse the repository at this point in the history
…nments

Fix #80, Remove extraneous assignments to CFE_SUCCESS
  • Loading branch information
dzbaker authored Mar 9, 2023
2 parents 5f74cd3 + 340c7bf commit a3bda6e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 18 deletions.
8 changes: 4 additions & 4 deletions fsw/src/ds_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ DS_AppData_t DS_AppData;

void DS_AppMain(void)
{
CFE_SB_Buffer_t *BufPtr = NULL;
int32 Result = CFE_SUCCESS;
CFE_SB_Buffer_t *BufPtr = NULL;
int32 Result;
uint32 RunStatus = CFE_ES_RunStatus_APP_RUN;

/*
Expand Down Expand Up @@ -176,8 +176,8 @@ void DS_AppMain(void)

int32 DS_AppInitialize(void)
{
int32 Result = CFE_SUCCESS;
int32 i = 0;
int32 Result;
int32 i = 0;

/*
** Initialize global data structure...
Expand Down
12 changes: 6 additions & 6 deletions fsw/src/ds_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ void DS_FileSetupWrite(int32 FileIndex, const CFE_SB_Buffer_t *BufPtr)
void DS_FileWriteData(int32 FileIndex, const void *FileData, uint32 DataLength)
{
DS_AppFileStatus_t *FileStatus = &DS_AppData.FileStatus[FileIndex];
int32 Result = CFE_SUCCESS;
int32 Result;

/*
** Let cFE manage the file I/O...
Expand Down Expand Up @@ -382,7 +382,7 @@ void DS_FileWriteHeader(int32 FileIndex)
DS_AppFileStatus_t *FileStatus = &DS_AppData.FileStatus[FileIndex];
CFE_FS_Header_t CFE_FS_Header;
DS_FileHeader_t DS_FileHeader;
int32 Result = CFE_SUCCESS;
int32 Result;

/*
** Initialize selected parts of the cFE file header...
Expand Down Expand Up @@ -475,9 +475,9 @@ void DS_FileWriteError(uint32 FileIndex, uint32 DataLength, int32 WriteResult)
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
void DS_FileCreateDest(uint32 FileIndex)
{
DS_DestFileEntry_t *DestFile = &DS_AppData.DestFileTblPtr->File[FileIndex];
DS_AppFileStatus_t *FileStatus = &DS_AppData.FileStatus[FileIndex];
int32 Result = CFE_SUCCESS;
DS_DestFileEntry_t *DestFile = &DS_AppData.DestFileTblPtr->File[FileIndex];
DS_AppFileStatus_t *FileStatus = &DS_AppData.FileStatus[FileIndex];
int32 Result;
osal_id_t LocalFileHandle = OS_OBJECT_ID_UNDEFINED;

/*
Expand Down Expand Up @@ -767,7 +767,7 @@ void DS_FileUpdateHeader(int32 FileIndex)
*/
DS_AppFileStatus_t *FileStatus = &DS_AppData.FileStatus[FileIndex];
CFE_TIME_SysTime_t CurrentTime = CFE_TIME_GetTime();
int32 Result = CFE_SUCCESS;
int32 Result;

Result = OS_lseek(FileStatus->FileHandle, sizeof(CFE_FS_Header_t), OS_SEEK_SET);

Expand Down
17 changes: 9 additions & 8 deletions fsw/src/ds_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@

int32 DS_TableInit(void)
{
int32 Result1 = CFE_SUCCESS;
int32 Result2 = CFE_SUCCESS;
int32 Result1;
int32 Result2;
bool NeedToLoadDestTable = false;
bool NeedToLoadFilterTable = false;
uint16 TableRegisterFlags = CFE_TBL_OPT_SNGL_BUFFER | CFE_TBL_OPT_LOAD_DUMP;
Expand Down Expand Up @@ -184,7 +184,8 @@ int32 DS_TableInit(void)

void DS_TableManageDestFile(void)
{
int32 i = 0, Result = CFE_SUCCESS;
int32 i = 0;
int32 Result;

/*
** Pointer will be NULL until first successful table load...
Expand Down Expand Up @@ -291,7 +292,7 @@ void DS_TableManageDestFile(void)

void DS_TableManageFilter(void)
{
int32 Result = CFE_SUCCESS;
int32 Result;

/*
** Pointer will be NULL until first successful filter table load...
Expand Down Expand Up @@ -872,8 +873,8 @@ int32 DS_TableCreateCDS(void)
{
/* Store file sequence counts and task ena/dis state in CDS */
uint32 DataStoreBuffer[DS_DEST_FILE_CNT + 1] = {0};
int32 Result = CFE_SUCCESS;
int32 i = 0;
int32 Result;
int32 i = 0;

/*
** Request for CDS area from cFE Executive Services...
Expand Down Expand Up @@ -943,8 +944,8 @@ void DS_TableUpdateCDS(void)
{
/* Store file sequence counts and task ena/dis state in CDS */
uint32 DataStoreBuffer[DS_DEST_FILE_CNT + 1] = {0};
int32 Result = CFE_SUCCESS;
int32 i = 0;
int32 Result;
int32 i = 0;

/*
** Handle is non-zero when CDS is active...
Expand Down

0 comments on commit a3bda6e

Please sign in to comment.