Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extraneous assignments to CFE_SUCCESS #80

Closed
2 tasks done
thnkslprpt opened this issue Feb 15, 2023 · 0 comments · Fixed by #81
Closed
2 tasks done

Extraneous assignments to CFE_SUCCESS #80

thnkslprpt opened this issue Feb 15, 2023 · 0 comments · Fixed by #81

Comments

@thnkslprpt
Copy link
Contributor

Checklist

  • I reviewed the Contributing Guide.
  • I performed a cursory search to see if the bug report is relevant, not redundant, nor in conflict with other tickets.

Describe the bug
DS has a few extraneous assignments to CFE_SUCCESS as in nasa/HS#10

Code snips

DS/fsw/src/ds_file.c

Lines 343 to 351 in d08de30

void DS_FileWriteData(int32 FileIndex, const void *FileData, uint32 DataLength)
{
DS_AppFileStatus_t *FileStatus = &DS_AppData.FileStatus[FileIndex];
int32 Result = CFE_SUCCESS;
/*
** Let cFE manage the file I/O...
*/
Result = OS_write(FileStatus->FileHandle, FileData, DataLength);

DS/fsw/src/ds_file.c

Lines 762 to 772 in d08de30

void DS_FileUpdateHeader(int32 FileIndex)
{
#if (DS_FILE_HEADER_TYPE == DS_FILE_HEADER_CFE)
/*
** Update CFE specific header fields...
*/
DS_AppFileStatus_t *FileStatus = &DS_AppData.FileStatus[FileIndex];
CFE_TIME_SysTime_t CurrentTime = CFE_TIME_GetTime();
int32 Result = CFE_SUCCESS;
Result = OS_lseek(FileStatus->FileHandle, sizeof(CFE_FS_Header_t), OS_SEEK_SET);

Expected behavior
Remove assignments - unnecessary code.

Reporter Info
Avi Weiss @thnkslprpt

thnkslprpt added a commit to thnkslprpt/DS that referenced this issue Feb 15, 2023
dzbaker added a commit that referenced this issue Mar 9, 2023
…nments

Fix #80, Remove extraneous assignments to CFE_SUCCESS
@dmknutsen dmknutsen added this to the Equuleus milestone May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants