nasa / PSP

The Core Flight System (cFS) Platform Support Package (PSP)
Apache License 2.0
66 stars 56 forks source link

Fix #382, Replace exit(1) and exit(-1) with EXIT_FAILURE macro #383

Closed thnkslprpt closed 7 months ago

thnkslprpt commented 1 year ago

Checklist

Describe the contribution

Note: A single case was replaced with EXIT_SUCCESS in CFE_PSP_DisplayUsage() - this call to exit() seems to be there simply to explicitly end execution of the function (it's a void function) so I assume there is no difference between exiting with SUCCESS or FAILURE.

Testing performed GitHub CI actions all passing successfully. Tested locally to confirm no change to test outcomes or coverage.

Expected behavior changes No change to behavior. The macros are more expressive and potentially more portable.

System(s) tested on Intel(R) Celeron(R) N4100 CPU @ 1.10GHz x86_64 Debian GNU/Linux 11 (bullseye) Current main branch of cFS.

Contributor Info Avi Weiss @thnkslprpt

skliper commented 7 months ago

@dzbaker Recommending CCB review/merge