[Git][slirp/libslirp][master] mbuf: Do not reallocate when the requested size already fits exactly

Samuel Thibault (@sthibaul) gitlab at gitlab.freedesktop.org
Thu Apr 25 18:31:09 UTC 2024



Samuel Thibault pushed to branch master at slirp / libslirp


Commits:
0b3155e1 by Samuel Thibault at 2024-04-25T20:26:22+02:00
mbuf: Do not reallocate when the requested size already fits exactly

- - - - -


1 changed file:

- src/mbuf.c


Changes:

=====================================
src/mbuf.c
=====================================
@@ -170,7 +170,7 @@ void m_inc(struct mbuf *m, int size)
     int gapsize;
 
     /* some compilers throw up on gotos.  This one we can fake. */
-    if (M_ROOM(m) > size) {
+    if (M_ROOM(m) >= size) {
         return;
     }
 



View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/commit/0b3155e18fa3279cce841b9828cd4feab5e5b7a8

-- 
View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/commit/0b3155e18fa3279cce841b9828cd4feab5e5b7a8
You're receiving this email because of your account on gitlab.freedesktop.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/slirp/attachments/20240425/60cbe042/attachment.htm>


More information about the Slirp mailing list