ovs/lib/ofpbuf.c
/* Trims the size of 'b' to fit its actual content, reducing its tailroom to
 * 0.  Its headroom, if any, is preserved.
 *
 * Buffers not obtained from malloc() are not resized, since that wouldn't save
 * any memory. */
Trims the size of 'b' to fit its actual content, reducing its tailroom to
0.  Its headroom, if any, is preserved.

Buffers not obtained from malloc() are not resized, since that wouldn't save
any memory.
Trims the size of ' b ' to fit its actual content reducing its tailroom to 0 . Its headroom if any is preserved . Buffers not obtained from malloc () are not resized since that wouldn ' t save any memory .
void
ofpbuf_trim(struct ofpbuf *b)
{
    if (b->source == OFPBUF_MALLOC
        && (ofpbuf_headroom(b) || ofpbuf_tailroom(b))) {
        ofpbuf_resize__(b, 0, 0);
    }
}
void ofpbuf_trim ( struct ofpbuf * b ) { if ( b -> source == OFPBUF_MALLOC && ( ofpbuf_headroom ( b ) || ofpbuf_tailroom ( b ) ) ) { ofpbuf_resize__ ( b , 0 , 0 ) ; } }
Trims the size of 'b' to fit its actual content, reducing its tailroom to
 0.
Trims the size of ' b ' to fit its actual content reducing its tailroom to 0 .