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:55:10 UTC

[incubator-nuttx] 03/03: net: remove unnecessary spaces

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 a5868864bc679eb18d78fe88c9281a5654aa6611
Author: chao.an <an...@xiaomi.com>
AuthorDate: Thu May 14 16:42:18 2020 +0800

    net: remove unnecessary spaces
    
    minor style fix
    
    Change-Id: I06b6fe48628440490090b89a39baf01481f79b79
    Signed-off-by: chao.an <an...@xiaomi.com>
---
 net/tcp/tcp_accept.c   |  2 +-
 net/udp/udp_recvfrom.c | 17 ++++++++++-------
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/net/tcp/tcp_accept.c b/net/tcp/tcp_accept.c
index e69c89d..c3c4426 100644
--- a/net/tcp/tcp_accept.c
+++ b/net/tcp/tcp_accept.c
@@ -300,7 +300,7 @@ int psock_tcp_accept(FAR struct socket *psock, FAR struct sockaddr *addr,
       conn->accept_private = NULL;
       conn->accept         = NULL;
 
-      nxsem_destroy(&state. acpt_sem);
+      nxsem_destroy(&state.acpt_sem);
 
       /* Check for a errors.  Errors are signalled by negative errno values
        * for the send length.
diff --git a/net/udp/udp_recvfrom.c b/net/udp/udp_recvfrom.c
index f2da4d2..2c19970 100644
--- a/net/udp/udp_recvfrom.c
+++ b/net/udp/udp_recvfrom.c
@@ -196,7 +196,8 @@ static inline void udp_newdata(FAR struct net_driver_s *dev,
 
 static inline void udp_readahead(struct udp_recvfrom_s *pstate)
 {
-  FAR struct udp_conn_s *conn = (FAR struct udp_conn_s *)pstate->ir_sock->s_conn;
+  FAR struct udp_conn_s *conn = (FAR struct udp_conn_s *)
+                                pstate->ir_sock->s_conn;
   FAR struct iob_s *iob;
   int recvlen;
 
@@ -572,8 +573,9 @@ static ssize_t udp_recvfrom_result(int result, struct udp_recvfrom_s *pstate)
       return pstate->ir_result;
     }
 
-  /* If net_timedwait failed, then we were probably reawakened by a signal. In
-   * this case, net_timedwait will have returned negated errno appropriately.
+  /* If net_timedwait failed, then we were probably reawakened by a signal.
+   * In this case, net_timedwait will have returned negated errno
+   * appropriately.
    */
 
   if (result < 0)
@@ -654,9 +656,10 @@ ssize_t psock_udp_recvfrom(FAR struct socket *psock, FAR void *buf,
         }
     }
 
-  /* It is okay to block if we need to.  If there is space to receive anything
-   * more, then we will wait to receive the data.  Otherwise return the number
-   * of bytes read from the read-ahead buffer (already in 'ret').
+  /* It is okay to block if we need to.  If there is space to receive
+   * anything more, then we will wait to receive the data. Otherwise
+   * return the number of bytes read from the read-ahead buffer
+   * (already in 'ret').
    *
    * NOTE: that udp_readahead() may set state.ir_recvlen == -1.
    */
@@ -686,7 +689,7 @@ ssize_t psock_udp_recvfrom(FAR struct socket *psock, FAR void *buf,
            * received.
            */
 
-          ret = net_timedwait(&state. ir_sem, _SO_TIMEOUT(psock->s_rcvtimeo));
+          ret = net_timedwait(&state.ir_sem, _SO_TIMEOUT(psock->s_rcvtimeo));
           if (ret == -ETIMEDOUT)
             {
               ret = -EAGAIN;