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

Fix #1473, Add helper for CFE_SB_Write...InfoCmd() with common logic #2285

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thnkslprpt
Copy link
Contributor

@thnkslprpt thnkslprpt commented Apr 7, 2023

Checklist

Describe the contribution

The 3 different commands now call CFE_SB_WriteInfo() with their personalised input parameters to perform the actual write. (I was considering naming the new function CFE_SB_PerformWriteInfoCmd()).

Testing performed
GitHub CI actions all passing successfully.
Local testing shows net coverage (for the full cFS bundle) is unaffected and the changes result in a net reduction of 22 lines and 12 branches.

Before the changes:

  lines......: 98.1% (13074 of 13326 lines)
  functions..: 97.0% (1041 of 1073 functions)
  branches...: 97.1% (5870 of 6047 branches)

After the changes:

  lines......: 98.1% (13052 of 13304 lines)
  functions..: 97.0% (1042 of 1074 functions)
  branches...: 97.1% (5858 of 6035 branches)

Expected behavior changes
No change to behavior.

System(s) tested on
Debian GNU/Linux 11 (bullseye)
Current main branch of cFS bundle.

Contributor Info
Avi Weiss @thnkslprpt

* See description in header file for argument/return detail
*
*-----------------------------------------------------------------*/
void CFE_SB_WriteInfo(const CFE_SB_WriteFileInfoCmd_t *data, enum CFE_FS_SubType InfoType, const char *FileDescription,

Check notice

Code scanning / CodeQL

Long function without assertion

All functions of more than 10 lines should have at least one assertion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add helper for CFE_SB_Write*InfoCmd to implement common logic
1 participant