From c1303660eda80c5e17fde06bb8f17715e7be049b Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Thu, 23 Mar 2023 20:16:08 +0000 Subject: Convert uint8_t struct boolean members to nxt_bool_t. Replace the usage of uint8_t in structures to represent boolean values with our nxt_bool_t type. This will result in no change in structure layout as the nxt_bool_t is now a uint8_t, same as what it's replacing. Even though it's essentially the same type, it makes it much clearer as to what its purpose is. This was largely done with the following script from Alex, with some manual conversions $ grep -rl 'uint8_t.*1 bit' src/ \ | xargs sed -i '/uint8_t.*1 bit/{s/uint8_t /nxt_bool_t /;s/; *\/\*.*/;/}' This doesn't convert the non-uint8_t booleans, they will be handled separately. Reviewed-by: Alejandro Colomar Signed-off-by: Andrew Clayton --- src/nxt_router.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nxt_router.c') diff --git a/src/nxt_router.c b/src/nxt_router.c index 992cc039..aa033ced 100644 --- a/src/nxt_router.c +++ b/src/nxt_router.c @@ -66,14 +66,14 @@ typedef struct { typedef struct { nxt_app_t *app; nxt_router_temp_conf_t *temp_conf; - uint8_t proto; /* 1 bit */ + nxt_bool_t proto; } nxt_app_rpc_t; typedef struct { nxt_app_joint_t *app_joint; uint32_t generation; - uint8_t proto; /* 1 bit */ + nxt_bool_t proto; } nxt_app_joint_rpc_t; -- cgit