diff --git a/src/os/portable/os-impl-bsd-sockets.c b/src/os/portable/os-impl-bsd-sockets.c index 144715f08..59bc5d26a 100644 --- a/src/os/portable/os-impl-bsd-sockets.c +++ b/src/os/portable/os-impl-bsd-sockets.c @@ -565,8 +565,8 @@ int32 OS_SocketAddrInit_Impl(OS_SockAddr_t *Addr, OS_SocketDomain_t Domain) return OS_ERR_NOT_IMPLEMENTED; } - Addr->ActualLength = OSAL_SIZE_C(addrlen); - Accessor->sa.sa_family = sa_family; + Addr->ActualLength = OSAL_SIZE_C(addrlen); + Accessor->sa.sa_family = sa_family; return OS_SUCCESS; } /* end OS_SocketAddrInit_Impl */ diff --git a/src/unit-test-coverage/portable/src/coveragetest-bsd-sockets.c b/src/unit-test-coverage/portable/src/coveragetest-bsd-sockets.c index 563dfbf64..7b4bc3141 100644 --- a/src/unit-test-coverage/portable/src/coveragetest-bsd-sockets.c +++ b/src/unit-test-coverage/portable/src/coveragetest-bsd-sockets.c @@ -35,14 +35,14 @@ void Test_OS_SocketOpen_Impl(void) OS_object_token_t token = {0}; /* Set up token for index 0 */ - token.obj_idx = UT_INDEX_0; + token.obj_idx = UT_INDEX_0; /* Invalid socket type */ OS_stream_table[0].socket_type = -1; OSAPI_TEST_FUNCTION_RC(OS_SocketOpen_Impl, (&token), OS_ERR_NOT_IMPLEMENTED); /* Invalid domain type */ - OS_stream_table[0].socket_type = OS_SocketType_DATAGRAM; + OS_stream_table[0].socket_type = OS_SocketType_DATAGRAM; OS_stream_table[0].socket_domain = -1; OSAPI_TEST_FUNCTION_RC(OS_SocketOpen_Impl, (&token), OS_ERR_NOT_IMPLEMENTED); @@ -52,10 +52,9 @@ void Test_OS_SocketOpen_Impl(void) OSAPI_TEST_FUNCTION_RC(OS_SocketOpen_Impl, (&token), OS_ERROR); /* Success case */ - OS_stream_table[0].socket_type = OS_SocketType_STREAM; + OS_stream_table[0].socket_type = OS_SocketType_STREAM; OS_stream_table[0].socket_domain = OS_SocketDomain_INET6; OSAPI_TEST_FUNCTION_RC(OS_SocketOpen_Impl, (&token), OS_SUCCESS); - } /* ------------------- End of test cases --------------------------------------*/ diff --git a/src/unit-test-coverage/ut-stubs/inc/OCS_sys_socket.h b/src/unit-test-coverage/ut-stubs/inc/OCS_sys_socket.h index a0078153f..098c1e16d 100644 --- a/src/unit-test-coverage/ut-stubs/inc/OCS_sys_socket.h +++ b/src/unit-test-coverage/ut-stubs/inc/OCS_sys_socket.h @@ -32,7 +32,7 @@ /* ----------------------------------------- */ /* types normally defined in sys/socket.h */ /* ----------------------------------------- */ -typedef size_t OCS_socklen_t; +typedef size_t OCS_socklen_t; typedef unsigned short int OCS_sa_family_t; struct OCS_sockaddr diff --git a/src/unit-test-coverage/ut-stubs/src/sys-socket-stubs.c b/src/unit-test-coverage/ut-stubs/src/sys-socket-stubs.c index a516efdab..88448c9c0 100644 --- a/src/unit-test-coverage/ut-stubs/src/sys-socket-stubs.c +++ b/src/unit-test-coverage/ut-stubs/src/sys-socket-stubs.c @@ -50,14 +50,13 @@ int OCS_listen(int fd, int n) return UT_DEFAULT_IMPL(OCS_listen); } -OCS_ssize_t OCS_recvfrom(int fd, void *buf, size_t n, int flags, struct OCS_sockaddr *addr, - OCS_socklen_t *addr_len) +OCS_ssize_t OCS_recvfrom(int fd, void *buf, size_t n, int flags, struct OCS_sockaddr *addr, OCS_socklen_t *addr_len) { return UT_DEFAULT_IMPL(OCS_recvfrom); } OCS_ssize_t OCS_sendto(int fd, const void *buf, size_t n, int flags, const struct OCS_sockaddr *addr, - OCS_socklen_t addr_len) + OCS_socklen_t addr_len) { return UT_DEFAULT_IMPL(OCS_sendto); }