From 03f462c5cd684c26e6cba3a77d0acf023eb6b126 Mon Sep 17 00:00:00 2001 From: "chao.an" Date: Thu, 14 May 2020 17:45:29 +0800 Subject: [PATCH] net/sockopt: fix nxstyle warning Signed-off-by: chao.an --- 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 45cf495f17..e7474adbf5 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 468d06c2c6..211a1dfe61 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 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 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