]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: buf: make b_ncat() take a const for the source
authorWilly Tarreau <w@1wt.eu>
Tue, 27 Feb 2024 18:06:41 +0000 (19:06 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 5 Mar 2024 10:50:34 +0000 (11:50 +0100)
In 2.7 with commit 35df34223b ("MINOR: buffers: split b_force_xfer() into
b_cpy() and b_force_xfer()"), b_ncat() was extracted from b_force_xfer()
but kept its source variable instead of constant, making it unusable for
calls from a const source. Let's just fix it.

include/haproxy/buf.h

index e98161ebee48938c5b3cc60a1c2437be89b36f3c..59484684a58d7bd8bcc4556f19fd07f5cd765e32 100644 (file)
@@ -619,7 +619,7 @@ static inline size_t b_xfer(struct buffer *dst, struct buffer *src, size_t count
  * b_room(dst).
  * Returns the number of bytes copied.
  */
-static inline size_t b_ncat(struct buffer *dst, struct buffer *src, size_t count)
+static inline size_t b_ncat(struct buffer *dst, const struct buffer *src, size_t count)
 {
        size_t ret, block1, block2;