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:17 UTC

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

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 */