Skip to content

Conversation

@thnkslprpt
Copy link
Contributor

Checklist

Describe the contribution

  • Fixes Remove addrlen switch duplication #864
    • switch to get addrlen from 3 functions refactored into into a single inline implementation
    • If someone can see a clear and worthwhile way to add OS_SocketAddrInit_Impl() I can add it.

Testing performed
GitHub CI actions all passing successfully (incl. Build + Run, Unit/Functional Tests etc.).
Local tests confirm net coverage unchanged.

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 prototype for argument/return detail
*
*-----------------------------------------------------------------*/
int32 OS_SocketBind_Impl(const OS_object_token_t *token, const OS_SockAddr_t *Addr)

Check notice

Code scanning / CodeQL

Long function without assertion

All functions of more than 10 lines should have at least one assertion.
*
*-----------------------------------------------------------------*/
int32 OS_SocketBind_Impl(const OS_object_token_t *token, const OS_SockAddr_t *Addr)
static inline socklen_t OS_GetAddrLen(sa_family_t sa_family)

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.

Remove addrlen switch duplication

1 participant