vandy commented on code in PR #1846:
URL: https://github.com/apache/mynewt-nimble/pull/1846#discussion_r1712601402
##########
porting/nimble/src/os_mbuf.c:
##########
@@ -633,19 +626,20 @@ os_mbuf_adj(struct os_mbuf *mp, int req_len)
* after the remaining size.
*/
len = -len;
+ if (m->om_len >= len) {
Review Comment:
If the mbuf size is greater than length than we don't need to iterate over
the whole chain to count the overall length.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]