diff --git a/src/afd.c b/src/afd.c index ed74ffb..1b6e8fe 100644 --- a/src/afd.c +++ b/src/afd.c @@ -37,8 +37,7 @@ static const GUID _AFD_PROVIDER_GUID_LIST[] = { /* This protocol info record is used by afd_create_driver_socket() to create * sockets that can be used as the first argument to afd_poll(). It is - * populated on startup by afd_global_init(). - */ + * populated on startup by afd_global_init(). */ static WSAPROTOCOL_INFOW _afd_driver_socket_template; static const WSAPROTOCOL_INFOW* _afd_find_protocol_info( @@ -76,8 +75,7 @@ int afd_global_init(void) { /* Find a WSAPROTOCOL_INFOW structure that we can use to create an MSAFD * socket. Preferentially we pick a UDP socket, otherwise try TCP or any - * other type. - */ + * other type. */ for (;;) { afd_info = _afd_find_protocol_info(infos, infos_count, IPPROTO_UDP); if (afd_info != NULL) @@ -174,9 +172,8 @@ int afd_poll(SOCKET driver_socket, sizeof *poll_info); if (overlapped == NULL) { - /* If this is a blocking operation, wait for the event to become - * signaled, and then grab the real status from the io status block. - */ + /* If this is a blocking operation, wait for the event to become signaled, + * and then grab the real status from the io status block. */ if (status == STATUS_PENDING) { DWORD r = WaitForSingleObject(event, INFINITE); diff --git a/src/port.c b/src/port.c index afc1dee..4d92f0f 100644 --- a/src/port.c +++ b/src/port.c @@ -214,8 +214,7 @@ int ep_port_wait(ep_port_t* port_info, } /* Compute the timeout for GetQueuedCompletionStatus, and the wait end - * time, if the user specified a timeout other than zero or infinite. - */ + * time, if the user specified a timeout other than zero or infinite. */ if (timeout > 0) { due = GetTickCount64() + timeout; gqcs_timeout = (DWORD) timeout; @@ -228,8 +227,7 @@ int ep_port_wait(ep_port_t* port_info, EnterCriticalSection(&port_info->lock); /* Dequeue completion packets until either at least one interesting event - * has been discovered, or the timeout is reached. - */ + * has been discovered, or the timeout is reached. */ for (;;) { ULONGLONG now; diff --git a/src/tree.h b/src/tree.h index d1c58ea..139e13f 100644 --- a/src/tree.h +++ b/src/tree.h @@ -7,10 +7,9 @@ #include "internal.h" #include "util.h" -/* NB: the tree functions do not set errno or LastError when they fail. Each of - * the API functions has at most one failure mode. It is up to the caller to - * set an appropriate error code when necessary. - */ +/* N.b.: the tree functions do not set errno or LastError when they fail. Each + * of the API functions has at most one failure mode. It is up to the caller to + * set an appropriate error code when necessary. */ typedef struct tree tree_t; typedef struct tree_node tree_node_t; diff --git a/src/ws.c b/src/ws.c index e100de5..857b7f0 100644 --- a/src/ws.c +++ b/src/ws.c @@ -42,8 +42,7 @@ SOCKET ws_get_base_socket(SOCKET socket) { } /* Retrieves a copy of the winsock catalog. - * The infos pointer must be released by the caller with free(). - */ + * The infos pointer must be released by the caller with free(). */ ssize_t ws_get_protocol_catalog(WSAPROTOCOL_INFOW** infos_out) { DWORD buffer_size = _WS_INITIAL_CATALOG_BUFFER_SIZE; int count; diff --git a/test/test-oneshot-and-hangup.c b/test/test-oneshot-and-hangup.c index 9cd5e3a..cd9d719 100644 --- a/test/test-oneshot-and-hangup.c +++ b/test/test-oneshot-and-hangup.c @@ -200,10 +200,9 @@ int main(void) { } { - /* Add the *write* socket to the epoll set. The event mask is empty, - * but since EPOLLHUP and EPOLLERR are always reportable, the next call to - * epoll_wait() should be able to detect that the connection is now closed. - */ + /* Add the *write* socket to the epoll set. The event mask is empty, but + * since EPOLLHUP and EPOLLERR are always reportable, the next call to + * epoll_wait() should detect that the connection has been closed. */ struct epoll_event ev; int r; diff --git a/test/test-udp-pings.c b/test/test-udp-pings.c index 90b2b7d..020bd67 100644 --- a/test/test-udp-pings.c +++ b/test/test-udp-pings.c @@ -53,8 +53,7 @@ int main(void) { r = connect(sock, (struct sockaddr*) &address, sizeof address); /* Unlike unix, windows sets the error to EWOULDBLOCK when the connection - * is being established in the background. - */ + * is being established in the background. */ check(r == 0 || WSAGetLastError() == WSAEWOULDBLOCK); ev.events = EPOLLOUT | EPOLLERR | EPOLLONESHOT;