summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_http.h
diff options
context:
space:
mode:
authorAndrew Clayton <andrew@digital-domain.net>2022-06-09 22:34:34 +0100
committerAndrew Clayton <andrew@digital-domain.net>2022-06-15 21:14:25 +0100
commit1956745549be6af6134825731caa5ce8aa99ca5c (patch)
tree9c0720c1dd0b6c0ddefe27c80d4bf0521a6a8cb7 /src/nxt_http.h
parent6a8081d71e805b12d0f7fd32ce72d60babadfc85 (diff)
downloadunit-archive/constParameter.tar.gz
unit-archive/constParameter.tar.bz2
Constified numerous function parameters.archive/constParameter
As was pointed out by the cppcheck[0] static code analysis utility we can mark numerous function parameters as 'const'. This acts 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 '')
-rw-r--r--src/nxt_http.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nxt_http.h b/src/nxt_http.h
index 37c27325..218d453e 100644
--- a/src/nxt_http.h
+++ b/src/nxt_http.h
@@ -370,8 +370,9 @@ nxt_int_t nxt_http_static_init(nxt_task_t *task, nxt_router_temp_conf_t *tmcf,
nxt_http_action_t *action, nxt_http_action_conf_t *acf);
nxt_int_t nxt_http_static_mtypes_init(nxt_mp_t *mp, nxt_lvlhsh_t *hash);
nxt_int_t nxt_http_static_mtypes_hash_add(nxt_mp_t *mp, nxt_lvlhsh_t *hash,
- nxt_str_t *exten, nxt_str_t *type);
-nxt_str_t *nxt_http_static_mtype_get(nxt_lvlhsh_t *hash, nxt_str_t *exten);
+ const nxt_str_t *exten, nxt_str_t *type);
+nxt_str_t *nxt_http_static_mtype_get(nxt_lvlhsh_t *hash,
+ const nxt_str_t *exten);
nxt_http_action_t *nxt_http_application_handler(nxt_task_t *task,
nxt_http_request_t *r, nxt_http_action_t *action);