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:49 UTC
[incubator-nuttx] 03/13: Minor fix (#23)
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 933a466a52c95ce0bc096b490d44be7ced344752
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Thu Jan 2 08:52:28 2020 -0600
Minor fix (#23)
* fix ieee802154/ieee802154_input.c:179:7: error: too few arguments to function 'iob_free'
iob_free(container->ic_iob);
^~~~~~~~
ieee802154/ieee802154_input.c:180:7: error: too many arguments to function 'ieee802154_container_free'
ieee802154_container_free(container, IOBUSER_NET_SOCK_IEEE802154);
^~~~~~~~~~~~~~~~~~~~~~~~~
* fix udp/udp_netpoll.c:327:10: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
* fix local/local_netpoll.c:154:15: warning: implicit declaration of function 'nxsem_post'; did you mean 'sem_post'? [-Wimplicit-function-declaration]
nxsem_post(fds->sem);
^~~~~~~~~~
sem_post
---
net/ieee802154/ieee802154_input.c | 4 ++--
net/local/local_netpoll.c | 1 +
net/tcp/tcp_netpoll.c | 2 +-
net/udp/udp_netpoll.c | 2 +-
4 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/net/ieee802154/ieee802154_input.c b/net/ieee802154/ieee802154_input.c
index 945ec0f..ae6ba95 100644
--- a/net/ieee802154/ieee802154_input.c
+++ b/net/ieee802154/ieee802154_input.c
@@ -176,8 +176,8 @@ static int ieee802154_queue_frame(FAR struct ieee802154_conn_s *conn,
/* Free both the IOB and the container */
- iob_free(container->ic_iob);
- ieee802154_container_free(container, IOBUSER_NET_SOCK_IEEE802154);
+ iob_free(container->ic_iob, IOBUSER_NET_SOCK_IEEE802154);
+ ieee802154_container_free(container);
}
else
{
diff --git a/net/local/local_netpoll.c b/net/local/local_netpoll.c
index ebcd978..bf038c3 100644
--- a/net/local/local_netpoll.c
+++ b/net/local/local_netpoll.c
@@ -44,6 +44,7 @@
#include <errno.h>
#include <debug.h>
+#include <nuttx/semaphore.h>
#include <nuttx/net/net.h>
#include <nuttx/fs/fs.h>
diff --git a/net/tcp/tcp_netpoll.c b/net/tcp/tcp_netpoll.c
index 3890d06..e883c97 100644
--- a/net/tcp/tcp_netpoll.c
+++ b/net/tcp/tcp_netpoll.c
@@ -232,7 +232,7 @@ int tcp_pollsetup(FAR struct socket *psock, FAR struct pollfd *fds)
FAR struct tcp_conn_s *conn = psock->s_conn;
FAR struct tcp_poll_s *info;
FAR struct devif_callback_s *cb;
- int ret;
+ int ret = OK;
/* Sanity check */
diff --git a/net/udp/udp_netpoll.c b/net/udp/udp_netpoll.c
index 0bf042b..c351ea5 100644
--- a/net/udp/udp_netpoll.c
+++ b/net/udp/udp_netpoll.c
@@ -204,7 +204,7 @@ int udp_pollsetup(FAR struct socket *psock, FAR struct pollfd *fds)
FAR struct udp_conn_s *conn = psock->s_conn;
FAR struct udp_poll_s *info;
FAR struct devif_callback_s *cb;
- int ret;
+ int ret = OK;
/* Sanity check */