]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: buffers: implement b_adv() to advance a buffer's pointer
authorWilly Tarreau <w@1wt.eu>
Sat, 5 May 2012 21:32:27 +0000 (23:32 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 8 May 2012 10:28:14 +0000 (12:28 +0200)
commit328582c3f9e712f4970cf1710fea04b824b6f999
tree679ac32f22170a2dd905000a19634725ef13c485
parentcc5cfcbccef2d07a1f688e60e03d2e8e8eca52c2
MEDIUM: buffers: implement b_adv() to advance a buffer's pointer

This is more convenient and efficient than buf->p = b_ptr(buf, n);
It simply advances the buffer's pointer by <n> and trasfers that
amount of bytes from <in> to <out>. The BF_OUT_EMPTY flag is updated
accordingly.

A few occurrences of such computations in buffers.c and stream_sock.c
were updated to use b_adv(), which resulted in a small code shrink.
include/proto/buffers.h
src/buffers.c
src/stream_sock.c