From b95dc8f29f18eb177f91fdc4bf0716fac9b15366 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Sun, 15 Oct 2023 12:06:11 +0200 Subject: [PATCH] Expanded usage of stdbool.h to the whole BIRD --- nest/route.h | 2 +- proto/aggregator/config.Y | 2 +- proto/bmp/bmp.h | 2 -- sysdep/config.h | 1 + sysdep/unix/alloc.c | 2 +- sysdep/unix/krt.c | 2 +- 6 files changed, 5 insertions(+), 6 deletions(-) diff --git a/nest/route.h b/nest/route.h index 12e85006..659783a8 100644 --- a/nest/route.h +++ b/nest/route.h @@ -655,7 +655,7 @@ ea_set_attr(ea_list **to, struct linpool *pool, uint id, uint flags, uint type, } static inline void -ea_unset_attr(ea_list **to, struct linpool *pool, _Bool local, uint code) +ea_unset_attr(ea_list **to, struct linpool *pool, bool local, uint code) { struct ea_one_attr_list *ea = lp_alloc(pool, sizeof(*ea)); *ea = (struct ea_one_attr_list) { diff --git a/proto/aggregator/config.Y b/proto/aggregator/config.Y index 0eb160cb..98d1037b 100644 --- a/proto/aggregator/config.Y +++ b/proto/aggregator/config.Y @@ -45,7 +45,7 @@ aggregator_proto_item: if (AGGREGATOR_CFG->aggr_on) cf_error("Only one aggregate on clause allowed"); - _Bool net_present = 0; + bool net_present = 0; int count = 0; for (const struct aggr_item_node *item = $3; item; item = item->next) { diff --git a/proto/bmp/bmp.h b/proto/bmp/bmp.h index 2d700c25..d69aaafb 100644 --- a/proto/bmp/bmp.h +++ b/proto/bmp/bmp.h @@ -18,8 +18,6 @@ #include "lib/socket.h" #include "proto/bmp/map.h" -#include - // Max length of MIB-II description object #define MIB_II_STR_LEN 255 diff --git a/sysdep/config.h b/sysdep/config.h index 56f3b0d5..82d0b51d 100644 --- a/sysdep/config.h +++ b/sysdep/config.h @@ -32,6 +32,7 @@ /* Types */ +#include #include typedef int8_t s8; typedef uint8_t u8; diff --git a/sysdep/unix/alloc.c b/sysdep/unix/alloc.c index c8f1c83f..08fc9980 100644 --- a/sysdep/unix/alloc.c +++ b/sysdep/unix/alloc.c @@ -35,7 +35,7 @@ long page_size = 0; STATIC_ASSERT(KEEP_PAGES_MAIN_MIN * 4 < KEEP_PAGES_MAIN_MAX); -static _Bool use_fake = 0; +static bool use_fake = 0; #if DEBUGGING struct free_page { diff --git a/sysdep/unix/krt.c b/sysdep/unix/krt.c index 7a078fb9..0664f4c1 100644 --- a/sysdep/unix/krt.c +++ b/sysdep/unix/krt.c @@ -805,7 +805,7 @@ krt_got_route_async(struct krt_proto *p, rte *e, int new, s8 src) static timer *krt_scan_all_timer; static int krt_scan_all_count; -static _Bool krt_scan_all_tables; +static bool krt_scan_all_tables; static void krt_scan_all(timer *t UNUSED)