0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-09-21 21:05:21 +00:00

Compilation fixes for CLang

This commit is contained in:
Maria Matejka 2022-02-04 15:42:04 +01:00
parent fe840ddad9
commit cc73726620
2 changed files with 2 additions and 2 deletions

View File

@ -124,7 +124,7 @@ static struct {
list proto_list;
} bfd_global;
static struct bfd_session bfd_admin_down = { .loc = { .state = BFD_STATE_ADMIN_DOWN }, };
static struct bfd_session bfd_admin_down = { .loc = ATOMIC_VAR_INIT((struct bfd_session_state) { .state = BFD_STATE_ADMIN_DOWN }), };
const char *bfd_state_names[] = { "AdminDown", "Down", "Init", "Up" };

View File

@ -128,7 +128,7 @@ struct bfd_session
_Atomic struct bfd_session_state loc;
struct bfd_session_state rem;
#define BFD_LOC_STATE(s) atomic_load_explicit(&(s)->loc, memory_order_relaxed)
#define BFD_LOC_STATE(s) ({ struct bfd_session_state _bss = atomic_load_explicit(&(s)->loc, memory_order_relaxed); _bss; })
u32 loc_id; /* Local session ID (local discriminator) */
u32 rem_id; /* Remote session ID (remote discriminator) */