From 3c3d59833aaade452ab00df29d13ecc67130433d Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Thu, 23 Mar 2023 21:29:12 +0000 Subject: Use nxt_bool_t in the configuration type system. This replaces the use of uint8_t to represent booleans in the configuration type system with the nxt_bool_t type (which happens to be a uint8_t). This is part of the work to use nxt_bool_t in structures to represent booleans rather than uint8_t's which is more intuitive. Reviewed-by: Alejandro Colomar Signed-off-by: Andrew Clayton --- src/nxt_conf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nxt_conf.c b/src/nxt_conf.c index 97764d42..d239b644 100644 --- a/src/nxt_conf.c +++ b/src/nxt_conf.c @@ -45,7 +45,7 @@ typedef struct nxt_conf_object_s nxt_conf_object_t; struct nxt_conf_value_s { union { - uint8_t boolean; /* 1 bit. */ + nxt_bool_t boolean; u_char number[NXT_CONF_MAX_NUMBER_LEN + 1]; struct { @@ -582,7 +582,7 @@ nxt_conf_map_object(nxt_mp_t *mp, nxt_conf_value_t *value, nxt_conf_map_t *map, nxt_conf_value_t *v; union { - uint8_t ui8; + nxt_bool_t b; int32_t i32; int64_t i64; int i; @@ -610,7 +610,7 @@ nxt_conf_map_object(nxt_mp_t *mp, nxt_conf_value_t *value, nxt_conf_map_t *map, case NXT_CONF_MAP_BOOL: if (v->type == NXT_CONF_VALUE_BOOLEAN) { - ptr->ui8 = v->u.boolean; + ptr->b = v->u.boolean; } break; -- cgit