]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: htx: Make http_get_stline take a `const struct`
authorTim Duesterhus <tim@bastelstu.be>
Sat, 3 Apr 2021 18:39:20 +0000 (20:39 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 8 Apr 2021 17:40:59 +0000 (19:40 +0200)
Nothing is being modified there, so this can be `const`.

include/haproxy/http_htx.h
src/http_htx.c

index fbd4438de2b62880e9c1274a25085f1bcd878123..d807584dec9050dc1da8e4938b1181a54e4248aa 100644 (file)
@@ -33,7 +33,7 @@ extern struct buffer http_err_chunks[HTTP_ERR_SIZE];
 extern struct http_reply http_err_replies[HTTP_ERR_SIZE];
 extern struct list http_errors_list;
 
-struct htx_sl *http_get_stline(struct htx *htx);
+struct htx_sl *http_get_stline(const struct htx *htx);
 size_t http_get_hdrs_size(struct htx *htx);
 int http_find_header(const struct htx *htx, const struct ist name, struct http_hdr_ctx *ctx, int full);
 int http_find_str_header(const struct htx *htx, const struct ist name, struct http_hdr_ctx *ctx, int full);
index fcfadce2bafdd9f6dc94411f24632b801ba1298c..a7951c01d97f6754999f2107c766fd25fd5f35b6 100644 (file)
@@ -60,7 +60,7 @@ struct conf_errors {
  * if the start-line is undefined (first == -1). Otherwise, it returns the
  * pointer on the htx_sl structure.
  */
-struct htx_sl *http_get_stline(struct htx *htx)
+struct htx_sl *http_get_stline(const struct htx *htx)
 {
        struct htx_blk *blk;