Skip to content
Snippets Groups Projects
Commit 4f60bfb4 authored by Gregory Nutt's avatar Gregory Nutt
Browse files

IOB: Change suggested by Rony Xln

parent 28d23da0
No related branches found
No related tags found
No related merge requests found
......@@ -112,21 +112,21 @@ FAR struct iob_s *iob_trimhead(FAR struct iob_s *iob, unsigned int trimlen)
* data size.
*/
pktlen -= iob->io_len;
trimlen -= iob->io_len;
iob->io_len = 0;
iob->io_offset = 0;
pktlen -= iob->io_len;
trimlen -= iob->io_len;
/* Check if this was the last entry in the chain */
next = iob->io_flink;
if (!next)
if (next == NULL)
{
/* Yes.. break out of the loop returning the empty
* I/O buffer chain containing only one empty entry.
*/
DEBUGASSERT(pktlen == 0);
iob->io_len = 0;
iob->io_offset = 0;
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment