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 2021/06/30 11:40:24 UTC
[incubator-nuttx] 04/04: tcp_recvwindow.c: Use iob_tailroom to
replace the home grown one
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 c7ba75697c258284d7e72dc2104307eb2c14ba91
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Jun 30 15:05:53 2021 +0900
tcp_recvwindow.c: Use iob_tailroom to replace the home grown one
---
net/tcp/tcp_recvwindow.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/net/tcp/tcp_recvwindow.c b/net/tcp/tcp_recvwindow.c
index fdb1569..3f0e0b8 100644
--- a/net/tcp/tcp_recvwindow.c
+++ b/net/tcp/tcp_recvwindow.c
@@ -110,17 +110,7 @@ uint16_t tcp_get_recvwindow(FAR struct net_driver_s *dev,
if (conn->readahead != NULL)
{
- /* XXX move this to mm/iob */
-
- const struct iob_s *iob;
-
- iob = conn->readahead;
- while (iob->io_flink != NULL)
- {
- iob = iob->io_flink;
- }
-
- tailroom = CONFIG_IOB_BUFSIZE - (iob->io_offset + iob->io_len);
+ tailroom = iob_tailroom(conn->readahead);
}
else
{