From 2254b8ef4ad377a8723df2754120df1016cf22ee Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 29 Oct 2019 13:06:21 +0100 Subject: [PATCH] Revert "MINOR: istbuf: add b_fromist() to make a buffer from an ist" This reverts commit 9e46496d45ff06317ae8f4f785e6117e5b786f6f. It was wrong and is not reliable, depending on the compiler's version and optimization, as the struct is assigned inside a statement, thus on its own stack. It's not needed anymore now so let's remove this. --- include/common/istbuf.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/common/istbuf.h b/include/common/istbuf.h index 933ec99fb4..9b6ce7c6bd 100644 --- a/include/common/istbuf.h +++ b/include/common/istbuf.h @@ -33,9 +33,6 @@ #include -/* makes a buffer pointer from an IST */ -#define b_fromist(in) ({ const struct ist __i = (in); &(const struct buffer){ .area = __i.ptr, .head = 0, .data = __i.len, .size = __i.len}; }) - /* b_isteq() : returns > 0 if the first characters of buffer starting * at offset relative to the buffer's head match . (empty strings do * match). It is designed to be used with reasonably small strings (it matches -- 2.47.3