tcp_recvwindow.c: Use iob_tailroom to replace the home grown one

This commit is contained in:
YAMAMOTO Takashi 2021-06-30 15:05:53 +09:00 committed by Xiang Xiao
parent 314237588e
commit c7ba75697c

View File

@ -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
{