]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: stream: make strm_dump_to_buffer() take a const stream
authorWilly Tarreau <w@1wt.eu>
Fri, 29 Sep 2023 07:01:53 +0000 (09:01 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 29 Sep 2023 07:20:27 +0000 (09:20 +0200)
Now that we don't need a variable anymore, let's pass a const stream.
It will void any doubt about what can happen to the stream when the
function is called from inspection points (show sess etc).

src/stream.c

index b69aa2c45a679b2f666764c67badacbc22e9cf91..18839b95c7c953d07c3d6fafd0ac157a7cca964c 100644 (file)
@@ -3243,7 +3243,7 @@ struct show_sess_ctx {
  * responsible for ensuring that enough room remains in the buffer to dump a
  * complete stream at once.
  */
-static void strm_dump_to_buffer(struct stream *strm, uint32_t anon_key)
+static void strm_dump_to_buffer(const struct stream *strm, uint32_t anon_key)
 {
        struct stconn *scf, *scb;
        struct tm tm;