]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: buffer: make bo_putchar() use b_tail()
authorWilly Tarreau <w@1wt.eu>
Mon, 9 Jul 2018 08:31:30 +0000 (10:31 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 19 Jul 2018 14:23:41 +0000 (16:23 +0200)
It's possible because we can't call bo_putchar() with i != 0.

include/common/buffer.h

index a05d58d7ad9dde2d97026756aade5c0aada66bd6..976ea0262903452c4066b195b7d6828196868d52 100644 (file)
@@ -205,7 +205,7 @@ static inline void bo_putchr(struct buffer *b, char c)
 {
        if (b_data(b) == b->size)
                return;
-       *b->p = c;
+       *b_tail(b) = c;
        b->p = b_peek(b, b->o + 1);
        b->o++;
 }