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/05/14 13:53:27 UTC
[incubator-nuttx] 02/02: net/sockopt: fix nxstyle warning
This is an automated email from the ASF dual-hosted git repository.
gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 03f462c5cd684c26e6cba3a77d0acf023eb6b126
Author: chao.an <an...@xiaomi.com>
AuthorDate: Thu May 14 17:45:29 2020 +0800
net/sockopt: fix nxstyle warning
Signed-off-by: chao.an <an...@xiaomi.com>
---
net/socket/getsockopt.c | 13 +++++++++----
net/socket/setsockopt.c | 15 +++++++++------
2 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/net/socket/getsockopt.c b/net/socket/getsockopt.c
index 45cf495..e7474ad 100644
--- a/net/socket/getsockopt.c
+++ b/net/socket/getsockopt.c
@@ -92,7 +92,8 @@
****************************************************************************/
static int psock_socketlevel_option(FAR struct socket *psock, int option,
- FAR void *value, FAR socklen_t *value_len)
+ FAR void *value,
+ FAR socklen_t *value_len)
{
/* Verify that the socket option if valid (but might not be supported ) */
@@ -121,7 +122,8 @@ static int psock_socketlevel_option(FAR struct socket *psock, int option,
default: /* Other options are passed to usrsock daemon. */
{
- return usrsock_getsockopt(conn, SOL_SOCKET, option, value, value_len);
+ return usrsock_getsockopt(conn, SOL_SOCKET,
+ option, value, value_len);
}
}
}
@@ -276,7 +278,9 @@ static int psock_socketlevel_option(FAR struct socket *psock, int option,
}
break;
- /* The following are not yet implemented (return values other than {0,1) */
+ /* The following are not yet implemented
+ * (return values other than {0,1})
+ */
case SO_LINGER: /* Lingers on a close() if data is present */
case SO_RCVBUF: /* Sets receive buffer size */
@@ -431,7 +435,8 @@ int psock_getsockopt(FAR struct socket *psock, int level, int option,
*
****************************************************************************/
-int getsockopt(int sockfd, int level, int option, void *value, socklen_t *value_len)
+int getsockopt(int sockfd, int level, int option,
+ void *value, socklen_t *value_len)
{
FAR struct socket *psock;
int ret;
diff --git a/net/socket/setsockopt.c b/net/socket/setsockopt.c
index 468d06c..211a1df 100644
--- a/net/socket/setsockopt.c
+++ b/net/socket/setsockopt.c
@@ -87,7 +87,8 @@
****************************************************************************/
static int psock_socketlevel_option(FAR struct socket *psock, int option,
- FAR const void *value, socklen_t value_len)
+ FAR const void *value,
+ socklen_t value_len)
{
/* Verify that the socket option if valid (but might not be supported ) */
@@ -259,7 +260,9 @@ static int psock_socketlevel_option(FAR struct socket *psock, int option,
net_lock();
- /* Set or clear the linger option bit and linger time (in deciseconds) */
+ /* Set or clear the linger option bit and linger time
+ * (in deciseconds)
+ */
if (setting->l_onoff)
{
@@ -315,8 +318,8 @@ static int psock_socketlevel_option(FAR struct socket *psock, int option,
* See <sys/socket.h> a complete list of values for the socket level
* 'option' argument.
*
- * Protocol level options, such as SOL_TCP, are defined in protocol-specific
- * header files, for example include/netinet/tcp.h
+ * Protocol level options, such as SOL_TCP, are defined in
+ * protocol-specific header files, for example include/netinet/tcp.h
*
* Input Parameters:
* psock Socket structure of socket to operate on
@@ -419,8 +422,8 @@ int psock_setsockopt(FAR struct socket *psock, int level, int option,
* See <sys/socket.h> a complete list of values for the socket level
* 'option' argument.
*
- * Protocol level options, such as SOL_TCP, are defined in protocol-specific
- * header files, for example include/netinet/tcp.h
+ * Protocol level options, such as SOL_TCP, are defined in
+ * protocol-specific header files, for example include/netinet/tcp.h
*
* Input Parameters:
* sockfd Socket descriptor of socket