From 5736b71193f87b4b032b2ab7f9ae8518a5e2560d Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 26 Aug 2024 10:34:15 +0300 Subject: [PATCH] Bluetooth: Host: Fix incorrect build assert We want to make sure `struct closure` fits in the user data, so a user data size of `sizeof(struct closure)` is valid. Signed-off-by: Johan Hedberg --- subsys/bluetooth/host/conn_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/bluetooth/host/conn_internal.h b/subsys/bluetooth/host/conn_internal.h index d900f559f16..1b9993e4836 100644 --- a/subsys/bluetooth/host/conn_internal.h +++ b/subsys/bluetooth/host/conn_internal.h @@ -333,7 +333,7 @@ struct closure { } __packed; #if defined(CONFIG_BT_CONN_TX_USER_DATA_SIZE) -BUILD_ASSERT(sizeof(struct closure) < CONFIG_BT_CONN_TX_USER_DATA_SIZE); +BUILD_ASSERT(sizeof(struct closure) <= CONFIG_BT_CONN_TX_USER_DATA_SIZE); #endif static inline void make_closure(void *storage, void *cb, void *data)