From: Tim Duesterhus Date: Sat, 3 Apr 2021 18:39:20 +0000 (+0200) Subject: CLEANUP: htx: Make http_get_stline take a `const struct` X-Git-Tag: v2.4-dev16~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8ee894b667f59b312fc44dfab7587ca6df013aa;p=thirdparty%2Fhaproxy.git CLEANUP: htx: Make http_get_stline take a `const struct` Nothing is being modified there, so this can be `const`. --- diff --git a/include/haproxy/http_htx.h b/include/haproxy/http_htx.h index fbd4438de2..d807584dec 100644 --- a/include/haproxy/http_htx.h +++ b/include/haproxy/http_htx.h @@ -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); diff --git a/src/http_htx.c b/src/http_htx.c index fcfadce2ba..a7951c01d9 100644 --- a/src/http_htx.c +++ b/src/http_htx.c @@ -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;