nasa / CS

The Core Flight System (cFS) Checksum (CS) application.
Apache License 2.0
28 stars 25 forks source link

Combine consecutive, mutually-exclusive status checks #67

Closed thnkslprpt closed 1 year ago

thnkslprpt commented 1 year ago

Checklist

Describe the bug A few cases of consecutive, mutually exclusive status checks in CS.

Code snips https://github.com/nasa/CS/blob/ed72e157f91341412afd0ea64a6f705800798e79/fsw/src/cs_init.c#L64-L71 https://github.com/nasa/CS/blob/ed72e157f91341412afd0ea64a6f705800798e79/fsw/src/cs_init.c#L112-L120

Expected behavior Combine into if/else constructs - clearer and reduces evaluations.

Reporter Info Avi Weiss @thnkslprpt