From 271e2a503d2c91b1a451455f585c19a27c5d5331 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 9 Jul 2018 10:31:30 +0200 Subject: [PATCH] MINOR: buffer: make bo_putchar() use b_tail() It's possible because we can't call bo_putchar() with i != 0. --- include/common/buffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/common/buffer.h b/include/common/buffer.h index a05d58d7a..976ea0262 100644 --- a/include/common/buffer.h +++ b/include/common/buffer.h @@ -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++; }