summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2021-12-19 01:53:27 +0100
committerAlejandro Colomar <alx.manpages@gmail.com>2022-04-26 12:38:48 +0200
commit940d695f827eaffd19723429732c07e2dc7fb467 (patch)
treee27fbaacc6c361c1079a7711f17ddcf43cbb7a37 /src
parent8138d15f76b1017ba61273f69416ffbe028b0d67 (diff)
downloadunit-940d695f827eaffd19723429732c07e2dc7fb467.tar.gz
unit-940d695f827eaffd19723429732c07e2dc7fb467.tar.bz2
Added 'const' for read-only function parameter.
That parameter is not being modified in the function. Make it 'const' to allow passing 'static const' variables.
Diffstat (limited to 'src')
-rw-r--r--src/nxt_conf.c3
-rw-r--r--src/nxt_conf.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/nxt_conf.c b/src/nxt_conf.c
index 1aca0a7e..8546e2b7 100644
--- a/src/nxt_conf.c
+++ b/src/nxt_conf.c
@@ -192,7 +192,8 @@ nxt_conf_set_string(nxt_conf_value_t *value, nxt_str_t *str)
nxt_int_t
-nxt_conf_set_string_dup(nxt_conf_value_t *value, nxt_mp_t *mp, nxt_str_t *str)
+nxt_conf_set_string_dup(nxt_conf_value_t *value, nxt_mp_t *mp,
+ const nxt_str_t *str)
{
nxt_str_t tmp, *ptr;
diff --git a/src/nxt_conf.h b/src/nxt_conf.h
index 8b3565fd..09f21756 100644
--- a/src/nxt_conf.h
+++ b/src/nxt_conf.h
@@ -115,7 +115,7 @@ nxt_int_t nxt_conf_validate(nxt_conf_validation_t *vldt);
NXT_EXPORT void nxt_conf_get_string(nxt_conf_value_t *value, nxt_str_t *str);
NXT_EXPORT void nxt_conf_set_string(nxt_conf_value_t *value, nxt_str_t *str);
NXT_EXPORT nxt_int_t nxt_conf_set_string_dup(nxt_conf_value_t *value,
- nxt_mp_t *mp, nxt_str_t *str);
+ nxt_mp_t *mp, const nxt_str_t *str);
NXT_EXPORT double nxt_conf_get_number(nxt_conf_value_t *value);
NXT_EXPORT uint8_t nxt_conf_get_boolean(nxt_conf_value_t *value);