diff options
author | Andrew Clayton <andrew@digital-domain.net> | 2022-06-16 02:00:52 +0100 |
---|---|---|
committer | Alejandro Colomar <alx.manpages@gmail.com> | 2022-06-22 00:30:44 +0200 |
commit | 4418f99cd46b17be893b6bd0df56434078e5aad3 (patch) | |
tree | 2a9c47681aac7159b088e8ac5925c900d072b0d3 /src/nxt_http_request.c | |
parent | 637a2006a6c0da5825dd6b04940e05e2c9feda5d (diff) | |
download | unit-4418f99cd46b17be893b6bd0df56434078e5aad3.tar.gz unit-4418f99cd46b17be893b6bd0df56434078e5aad3.tar.bz2 |
Constified numerous function parameters.
As was pointed out by the cppcheck[0] static code analysis utility we
can mark numerous function parameters as 'const'. This acts as a hint to
the compiler about our intentions and the compiler will tell us when we
deviate from them.
[0]: https://cppcheck.sourceforge.io/
Diffstat (limited to 'src/nxt_http_request.c')
-rw-r--r-- | src/nxt_http_request.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nxt_http_request.c b/src/nxt_http_request.c index 7fb86cc4..8aa20e59 100644 --- a/src/nxt_http_request.c +++ b/src/nxt_http_request.c @@ -30,11 +30,11 @@ static u_char *nxt_http_date_cache_handler(u_char *buf, nxt_realtime_t *now, static nxt_http_name_value_t *nxt_http_argument(nxt_array_t *array, u_char *name, size_t name_length, uint32_t hash, u_char *start, - u_char *end); + const u_char *end); static nxt_int_t nxt_http_cookie_parse(nxt_array_t *cookies, u_char *start, - u_char *end); + const u_char *end); static nxt_http_name_value_t *nxt_http_cookie(nxt_array_t *array, u_char *name, - size_t name_length, u_char *start, u_char *end); + size_t name_length, u_char *start, const u_char *end); #define NXT_HTTP_COOKIE_HASH \ @@ -949,7 +949,7 @@ nxt_http_arguments_parse(nxt_http_request_t *r) static nxt_http_name_value_t * nxt_http_argument(nxt_array_t *array, u_char *name, size_t name_length, - uint32_t hash, u_char *start, u_char *end) + uint32_t hash, u_char *start, const u_char *end) { size_t length; nxt_http_name_value_t *nv; @@ -1018,7 +1018,7 @@ nxt_http_cookies_parse(nxt_http_request_t *r) static nxt_int_t -nxt_http_cookie_parse(nxt_array_t *cookies, u_char *start, u_char *end) +nxt_http_cookie_parse(nxt_array_t *cookies, u_char *start, const u_char *end) { size_t name_length; u_char c, *p, *name; @@ -1067,7 +1067,7 @@ nxt_http_cookie_parse(nxt_array_t *cookies, u_char *start, u_char *end) static nxt_http_name_value_t * nxt_http_cookie(nxt_array_t *array, u_char *name, size_t name_length, - u_char *start, u_char *end) + u_char *start, const u_char *end) { u_char c, *p; uint32_t hash; |