You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/06/02 14:09:41 UTC
[incubator-nuttx] 23/31: Code style fixes 2
This is an automated email from the ASF dual-hosted git repository.
gnutt pushed a commit to branch SocketCAN
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 95d8441a09607d66c480e54126f30a8947dcea4b
Author: Jari van Ewijk <ja...@nxp.com>
AuthorDate: Fri Mar 13 14:30:32 2020 +0100
Code style fixes 2
---
include/sys/socket.h | 13 +++++++------
libs/libc/net/lib_recvmsg.c | 3 ++-
net/bluetooth/bluetooth_sockif.c | 34 ++++++++++++++++++----------------
3 files changed, 27 insertions(+), 23 deletions(-)
diff --git a/include/sys/socket.h b/include/sys/socket.h
index 4cf40a7..87cb8e8 100644
--- a/include/sys/socket.h
+++ b/include/sys/socket.h
@@ -157,10 +157,10 @@
#define SO_ERROR 4 /* Reports and clears error status (get only).
* arg: returns an integer value
*/
-#define SO_KEEPALIVE 5 /* Keeps connections active by enabling the periodic
- * transmission of messages (get/set).
- * arg: pointer to integer containing a boolean int
- * value
+#define SO_KEEPALIVE 5 /* Keeps connections active by enabling the
+ * periodic transmission of messages (get/set).
+ * arg: pointer to integer containing a boolean
+ * int value
*/
#define SO_LINGER 6 /* Lingers on a close() if data is present (get/set)
* arg: struct linger
@@ -194,8 +194,9 @@
* arg: integer value
*/
#define SO_SNDTIMEO 14 /* Sets the timeout value specifying the amount of
- * time that an output function blocks because flow
- * control prevents data from being sent(get/set).
+ * time that an output function blocks because
+ * flow control prevents data from being sent
+ * (get/set).
* arg: struct timeval
*/
#define SO_TYPE 15 /* Reports the socket type (get only).
diff --git a/libs/libc/net/lib_recvmsg.c b/libs/libc/net/lib_recvmsg.c
index 2513dfa..5200acd 100644
--- a/libs/libc/net/lib_recvmsg.c
+++ b/libs/libc/net/lib_recvmsg.c
@@ -53,7 +53,8 @@
* Function: recvmsg
*
* Description:
- * The recvmsg() call is identical to recvfrom() with a NULL from parameter.
+ * The recvmsg() call is identical to recvfrom() with a NULL from
+ * parameter.
*
* Parameters:
* sockfd Socket descriptor of socket
diff --git a/net/bluetooth/bluetooth_sockif.c b/net/bluetooth/bluetooth_sockif.c
index 4f4b936..fd6d95f 100644
--- a/net/bluetooth/bluetooth_sockif.c
+++ b/net/bluetooth/bluetooth_sockif.c
@@ -106,7 +106,7 @@ const struct sock_intf_s g_bluetooth_sockif =
bluetooth_send, /* si_send */
bluetooth_sendto, /* si_sendto */
#ifdef CONFIG_NET_SENDFILE
- NULL, /* si_sendfile */
+ NULL, /* si_sendfile */
#endif
bluetooth_recvfrom, /* si_recvfrom */
#ifdef CONFIG_NET_RECVMSG_CMSG
@@ -246,10 +246,10 @@ static void bluetooth_addref(FAR struct socket *psock)
* Name: bluetooth_connect
*
* Description:
- * bluetooth_connect() connects the local socket referred to by the structure
- * 'psock' to the address specified by 'addr'. The addrlen argument
- * specifies the size of 'addr'. The format of the address in 'addr' is
- * determined by the address space of the socket 'psock'.
+ * bluetooth_connect() connects the local socket referred to by the
+ * structure 'psock' to the address specified by 'addr'. The addrlen
+ * argument specifies the size of 'addr'. The format of the address in
+ * 'addr' is determined by the address space of the socket 'psock'.
*
* Generally, connection-based protocol sockets may successfully
* bluetooth_connect() only once; connectionless protocol sockets may use
@@ -333,7 +333,8 @@ static int bluetooth_connect(FAR struct socket *psock,
* Input Parameters:
* psock Reference to the listening socket structure
* addr Receives the address of the connecting client
- * addrlen Input: allocated size of 'addr', Return: returned size of 'addr'
+ * addrlen Input: allocated size of 'addr',
+ * Return: returned size of 'addr'
* newsock Location to return the accepted socket information.
*
* Returned Value:
@@ -375,7 +376,7 @@ static int bluetooth_accept(FAR struct socket *psock,
****************************************************************************/
static int bluetooth_bind(FAR struct socket *psock,
- FAR const struct sockaddr *addr, socklen_t addrlen)
+ FAR const struct sockaddr *addr, socklen_t addrlen)
{
FAR const struct sockaddr_bt_s *iaddr;
FAR struct radio_driver_s *radio;
@@ -442,10 +443,10 @@ static int bluetooth_bind(FAR struct socket *psock,
* Name: bluetooth_getsockname
*
* Description:
- * The bluetooth_getsockname() function retrieves the locally-bound name of the
- * specified packet socket, stores this address in the sockaddr structure
- * pointed to by the 'addr' argument, and stores the length of this
- * address in the object pointed to by the 'addrlen' argument.
+ * The bluetooth_getsockname() function retrieves the locally-bound name of
+ * the specified packet socket, stores this address in the sockaddr
+ * structure pointed to by the 'addr' argument, and stores the length of
+ * this address in the object pointed to by the 'addrlen' argument.
*
* If the actual length of the address is greater than the length of the
* supplied sockaddr structure, the stored address will be truncated.
@@ -504,8 +505,8 @@ static int bluetooth_getsockname(FAR struct socket *psock,
* Name: bluetooth_getpeername
*
* Description:
- * The bluetooth_getpeername() function retrieves the remote-connected name of
- * the specified local socket, stores this address in the sockaddr
+ * The bluetooth_getpeername() function retrieves the remote-connected name
+ * of the specified local socket, stores this address in the sockaddr
* structure pointed to by the 'addr' argument, and stores the length of
* this address in the object pointed to by the 'addrlen' argument.
*
@@ -708,9 +709,10 @@ static ssize_t bluetooth_send(FAR struct socket *psock, FAR const void *buf,
*
****************************************************************************/
-static ssize_t bluetooth_sendto(FAR struct socket *psock, FAR const void *buf,
- size_t len, int flags,
- FAR const struct sockaddr *to, socklen_t tolen)
+static ssize_t bluetooth_sendto(FAR struct socket *psock,
+ FAR const void *buf, size_t len, int flags,
+ FAR const struct sockaddr *to,
+ socklen_t tolen)
{
ssize_t ret;