socket: improve code

Add more assertions and other checks, and improve coding style a bit.
This commit is contained in:
Miroslav Lichvar
2020-08-11 17:07:14 +02:00
parent 8c75f44603
commit 9ac582fa35
3 changed files with 31 additions and 14 deletions

View File

@@ -757,7 +757,7 @@ NIO_Linux_ProcessMessage(SCK_Message *message, NTP_Local_Address *local_addr,
l2_length = message->length;
message->length = extract_udp_data(message->data, &message->remote_addr.ip, message->length);
DEBUG_LOG("Extracted message for %s fd=%d len=%u",
DEBUG_LOG("Extracted message for %s fd=%d len=%d",
UTI_IPSockAddrToString(&message->remote_addr.ip),
local_addr->sock_fd, message->length);