cFE icon indicating copy to clipboard operation
cFE copied to clipboard

Fix #1428, Refactor error handling for EVS_GetApplicationInfo()

Open thnkslprpt opened this issue 2 years ago • 3 comments

Checklist

Describe the contribution

  • Fixes #1428
    • Refactors (10 cases of) identical handling of error returns from EVS_GetApplicationInfo() into a single helper function.

The function prototype isn't strictly required, given the placement of the function definition, but is probably worth having to improve clarity and ease future maintenance.

Can also be implemented as an if/else if/else block (see below). No strong preference but I've left it as a switch for now. Screenshot 2022-11-16 14 29 58

Testing performed GitHub CI actions (incl. Build + Run, Unit Tests etc.) all passing successfully. Tested locally as well and confirmed coverage of all new/amended lines of code via LCOV report.

Expected behavior changes No impact on behavior. The same events will occur in the same circumstances.

System(s) tested on Intel(R) Celeron(R) N4100 CPU @ 1.10GHz x86_64 Debian GNU/Linux 11 (bullseye) Current main branch cFS bundle. cFE v7.0.0-rc4+dev205

Contributor Info Avi Weiss @thnkslprpt

thnkslprpt avatar Nov 16 '22 07:11 thnkslprpt

Question: Does this require new tests, or is the coverage coming through from the calling functions satisfactory?

thnkslprpt avatar Nov 16 '22 07:11 thnkslprpt

You have successfully added a new CodeQL configuration coding-standard. As part of the setup process, we have scanned this repository and found 1906 existing alerts. Please check the repository Security tab to see all alerts.

You have successfully added a new CodeQL configuration security. As part of the setup process, we have scanned this repository and found 30 existing alerts. Please check the repository Security tab to see all alerts.