From: Willy Tarreau Date: Tue, 29 Oct 2019 12:06:21 +0000 (+0100) Subject: Revert "MINOR: istbuf: add b_fromist() to make a buffer from an ist" X-Git-Tag: v2.1-dev4~24 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2254b8ef4ad377a8723df2754120df1016cf22ee;p=thirdparty%2Fhaproxy.git 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. --- 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