diff options
author | Andrew Clayton <a.clayton@nginx.com> | 2023-03-23 21:23:36 +0000 |
---|---|---|
committer | Andrew Clayton <a.clayton@nginx.com> | 2023-03-28 23:15:28 +0100 |
commit | d54e63d8dda8a859c16197f181a59e804d165eaf (patch) | |
tree | 9f1d513b92c962182997fcb7b9bf4d06c2a96a6d | |
parent | 5d0f586d56da625bc7bcc3ad6d4e3445eeac0fa3 (diff) | |
download | unit-d54e63d8dda8a859c16197f181a59e804d165eaf.tar.gz unit-d54e63d8dda8a859c16197f181a59e804d165eaf.tar.bz2 |
Use NXT_CONF_MAP_BOOL.
This replaces the use of NXT_CONF_MAP_INT8 for denoting boolean values.
It also makes NXT_CONF_MAP_BOOL an alias for NXT_CONF_MAP_INT8 in
nxt_conf_map_object(). A future commit will remove NXT_CONF_MAP_INT8.
Reviewed-by: Alejandro Colomar <alx@nginx.com>
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
-rw-r--r-- | src/nxt_conf.c | 1 | ||||
-rw-r--r-- | src/nxt_router.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/nxt_conf.c b/src/nxt_conf.c index d04aa45c..9bb61396 100644 --- a/src/nxt_conf.c +++ b/src/nxt_conf.c @@ -607,6 +607,7 @@ nxt_conf_map_object(nxt_mp_t *mp, nxt_conf_value_t *value, nxt_conf_map_t *map, switch (map[i].type) { + case NXT_CONF_MAP_BOOL: case NXT_CONF_MAP_INT8: if (v->type == NXT_CONF_VALUE_BOOLEAN) { diff --git a/src/nxt_router.c b/src/nxt_router.c index aa033ced..e6a342b0 100644 --- a/src/nxt_router.c +++ b/src/nxt_router.c @@ -1510,13 +1510,13 @@ static nxt_conf_map_t nxt_router_http_conf[] = { { nxt_string("discard_unsafe_fields"), - NXT_CONF_MAP_INT8, + NXT_CONF_MAP_BOOL, offsetof(nxt_socket_conf_t, discard_unsafe_fields), }, { nxt_string("log_route"), - NXT_CONF_MAP_INT8, + NXT_CONF_MAP_BOOL, offsetof(nxt_socket_conf_t, log_route), }, }; |