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/01/03 15:27:55 UTC

[incubator-nuttx] 09/13: net/icmp/icmp_netpoll.c: Fix return of uninitialized 'ret' when no error occurs. That is, on what should be a successful return from this function, an uninitialized value was returned, which may indicate an undeserved error.

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

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

commit ff4ebe2ff9c02d940b7c414284a81d1c088de979
Author: Nathan Hartman <ha...@gmail.com>
AuthorDate: Thu Jan 2 14:40:08 2020 -0600

    net/icmp/icmp_netpoll.c: Fix return of uninitialized 'ret' when no error occurs.  That is, on what should be a successful return from this function, an uninitialized value was returned, which may indicate an undeserved error.
---
 net/icmp/icmp_netpoll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/icmp/icmp_netpoll.c b/net/icmp/icmp_netpoll.c
index 2981891..9ed239f 100644
--- a/net/icmp/icmp_netpoll.c
+++ b/net/icmp/icmp_netpoll.c
@@ -159,7 +159,7 @@ int icmp_pollsetup(FAR struct socket *psock, FAR struct pollfd *fds)
   FAR struct icmp_conn_s *conn = psock->s_conn;
   FAR struct icmp_poll_s *info;
   FAR struct devif_callback_s *cb;
-  int ret;
+  int ret = OK;
 
   DEBUGASSERT(conn != NULL && fds != NULL);