Skip to content

Commit

Permalink
fix style
Browse files Browse the repository at this point in the history
  • Loading branch information
serges147 committed Dec 19, 2024
1 parent 587d558 commit e0dad41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ class KqueueSingleThreadedExecutor final : public libcyphal::platform::SingleThr
// Convert libcyphal timeout (if any) to the `struct timespec` timeout in ns.
// Any possible negative timeout will be treated as zero (return immediately from the `::kevent`).
//
struct timespec timeout_spec{};
struct timespec timeout_spec
{};
const struct timespec* timeout_spec_ptr = nullptr;
if (timeout)
{
Expand Down
8 changes: 4 additions & 4 deletions src/daemon/engine/platform/udp/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ int16_t udpTxInit(UDPTxHandle* const self, const uint32_t local_iface_address)
bool ok = self->fd >= 0;
//
ok = ok && bind(self->fd,
(struct sockaddr*) &(struct sockaddr_in) {
(struct sockaddr*) &(struct sockaddr_in){
.sin_family = AF_INET,
.sin_addr = {local_iface_be},
.sin_port = 0,
Expand Down Expand Up @@ -82,9 +82,9 @@ int16_t udpTxSend(UDPTxHandle* const self,
payload,
payload_size,
MSG_DONTWAIT,
(struct sockaddr*) &(struct sockaddr_in) {.sin_family = AF_INET,
.sin_addr = {.s_addr = htonl(remote_address)},
.sin_port = htons(remote_port)},
(struct sockaddr*) &(struct sockaddr_in){.sin_family = AF_INET,
.sin_addr = {.s_addr = htonl(remote_address)},
.sin_port = htons(remote_port)},
sizeof(struct sockaddr_in));
if (send_result == (ssize_t) payload_size)
{
Expand Down

0 comments on commit e0dad41

Please sign in to comment.