You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/06/01 13:54:16 UTC

[incubator-nuttx] branch master updated (d1343df -> 17e4582)

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.


    from d1343df  libc/time: Implement timespec_get for C11
     new 1f8de34  net/inet/inet_sockif.c: Fix debugassert compilation
     new 17e4582  net/inet/inet_sockif.c: Fix long lines

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 net/inet/inet_sockif.c | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)


[incubator-nuttx] 01/02: net/inet/inet_sockif.c: Fix debugassert compilation

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 1f8de344dda61ac2d6aecd5ad1dd2fd90e834bdf
Author: Jukka Laitinen <ju...@intel.com>
AuthorDate: Mon Jun 1 14:50:32 2020 +0300

    net/inet/inet_sockif.c: Fix debugassert compilation
    
    Should derefer addrlen pointer, instead of comparing whether
    the pointer itself is > 0
    
    Signed-off-by: Jukka Laitinen <ju...@intel.com>
---
 net/inet/inet_sockif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/inet/inet_sockif.c b/net/inet/inet_sockif.c
index 7a71ff9..1897214 100644
--- a/net/inet/inet_sockif.c
+++ b/net/inet/inet_sockif.c
@@ -830,7 +830,7 @@ static int inet_accept(FAR struct socket *psock, FAR struct sockaddr *addr,
     {
       /* If an address is provided, then the length must also be provided. */
 
-      DEBUGASSERT(addrlen > 0);
+      DEBUGASSERT(*addrlen > 0);
 
       /* A valid length depends on the address domain */
 


[incubator-nuttx] 02/02: net/inet/inet_sockif.c: Fix long lines

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 17e45820c64fd62d68eae79d91dd1b0b4d8ab6a1
Author: Jukka Laitinen <ju...@intel.com>
AuthorDate: Mon Jun 1 15:47:42 2020 +0300

    net/inet/inet_sockif.c: Fix long lines
    
    Signed-off-by: Jukka Laitinen <ju...@intel.com>
---
 net/inet/inet_sockif.c | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/net/inet/inet_sockif.c b/net/inet/inet_sockif.c
index 1897214..9456510 100644
--- a/net/inet/inet_sockif.c
+++ b/net/inet/inet_sockif.c
@@ -208,7 +208,8 @@ static int inet_udp_alloc(FAR struct socket *psock)
  *   families.
  *
  * Input Parameters:
- *   psock    A pointer to a user allocated socket structure to be initialized.
+ *   psock    A pointer to a user allocated socket structure to be
+ *            initialized.
  *   protocol (see sys/socket.h)
  *
  * Returned Value:
@@ -428,7 +429,8 @@ static int inet_bind(FAR struct socket *psock,
 
           ret = udp_bind(psock->s_conn, addr);
 #else
-          nwarn("WARNING: UDP stack is not available in this configuration\n");
+          nwarn("WARNING: UDP stack is not available in this "
+                "configuration\n");
           ret = -ENOSYS;
 #endif
         }
@@ -669,7 +671,8 @@ int inet_listen(FAR struct socket *psock, int backlog)
 static int inet_connect(FAR struct socket *psock,
                         FAR const struct sockaddr *addr, socklen_t addrlen)
 {
-  FAR const struct sockaddr_in *inaddr = (FAR const struct sockaddr_in *)addr;
+  FAR const struct sockaddr_in *inaddr =
+    (FAR const struct sockaddr_in *)addr;
 
   /* Verify that a valid address has been provided */
 
@@ -795,7 +798,8 @@ static int inet_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:
@@ -1160,8 +1164,8 @@ static ssize_t inet_send(FAR struct socket *psock, FAR const void *buf,
  ****************************************************************************/
 
 static ssize_t inet_sendto(FAR struct socket *psock, FAR const void *buf,
-                           size_t len, int flags, FAR const struct sockaddr *to,
-                           socklen_t tolen)
+                           size_t len, int flags,
+                           FAR const struct sockaddr *to, socklen_t tolen)
 {
   socklen_t minlen;
   ssize_t nsent;
@@ -1300,7 +1304,8 @@ static ssize_t inet_sendfile(FAR struct socket *psock,
  ****************************************************************************/
 
 static ssize_t inet_recvfrom(FAR struct socket *psock, FAR void *buf,
-                             size_t len, int flags, FAR struct sockaddr *from,
+                             size_t len, int flags,
+                             FAR struct sockaddr *from,
                              FAR socklen_t *fromlen)
 {
   ssize_t ret;