]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
Revert "MINOR: istbuf: add b_fromist() to make a buffer from an ist"
authorWilly Tarreau <w@1wt.eu>
Tue, 29 Oct 2019 12:06:21 +0000 (13:06 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 29 Oct 2019 12:09:14 +0000 (13:09 +0100)
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

index 933ec99fb4ccc7cd384f0f306fa4728f1d0fa32f..9b6ce7c6bdf4ea9918225fedf56473297c78d843 100644 (file)
@@ -33,9 +33,6 @@
 #include <common/ist.h>
 
 
-/* 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 <n> characters of buffer <b> starting
  * at offset <o> relative to the buffer's head match <ist>. (empty strings do
  * match). It is designed to be used with reasonably small strings (it matches