Skip to content

Commit 28f8947

Browse files
Johan Hedbergjhedberg
authored andcommitted
Bluetooth: host: Shrink size of struct bt_conn_tx
The `node` and `work` members are never used simultaneously. Additionally k_work already has built-in support for being in a linked list, however a union makes this change a bit cleaner. Signed-off-by: Johan Hedberg <[email protected]>
1 parent 0d64e8d commit 28f8947

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

subsys/bluetooth/host/conn_internal.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,11 @@ struct bt_conn_tx_data {
8585
};
8686

8787
struct bt_conn_tx {
88-
sys_snode_t node;
88+
union {
89+
sys_snode_t node;
90+
struct k_work work;
91+
};
8992
struct bt_conn *conn;
90-
struct k_work work;
9193
struct bt_conn_tx_data data;
9294
};
9395

0 commit comments

Comments
 (0)