This patch removes buffer_realign() and replaces it with c_realign_if_empty()
instead.
buf->p += n;
}
-/* Tries to realign the given buffer. */
-static inline void buffer_realign(struct buffer *buf)
-{
- if (!(buf->i | buf->o)) {
- /* let's realign the buffer to optimize I/O */
- buf->p = buf->data;
- }
-}
-
/* Schedule all remaining buffer data to be sent. ->o is not touched if it
* already covers those data. That permits doing a flush even after a forward,
* although not recommended.
return -2;
}
- buffer_realign(chn->buf);
+ c_realign_if_empty(chn);
max = bo_contig_space(chn->buf);
if (len > max)
return max;
s->res.buf->i = 0;
/* Now we can realign the response buffer */
- buffer_realign(s->res.buf);
+ c_realign_if_empty(&s->res);
s->req.rto = strm_fe(s)->timeout.client;
s->req.wto = TICK_ETERNITY;