ble_mesh: stack: fix the structure init order to meet C++ requirements

This commit is contained in:
InfiniteYuan
2022-08-16 17:48:04 +08:00
committed by YuanMingFu
parent a047d5d097
commit 8191f319a3
7 changed files with 1133 additions and 42 deletions

View File

@@ -840,22 +840,22 @@ struct net_buf_pool {
#if CONFIG_BLE_MESH_NET_BUF_POOL_USAGE
#define NET_BUF_POOL_INITIALIZER(_pool, _alloc, _bufs, _count, _destroy) \
{ \
.alloc = _alloc, \
.__bufs = (struct net_buf *)_bufs, \
.buf_count = _count, \
.uninit_count = _count, \
.avail_count = _count, \
.destroy = _destroy, \
.name = STRINGIFY(_pool), \
.destroy = _destroy, \
.alloc = _alloc, \
.__bufs = (struct net_buf *)_bufs, \
}
#else
#define NET_BUF_POOL_INITIALIZER(_pool, _alloc, _bufs, _count, _destroy) \
{ \
.alloc = _alloc, \
.__bufs = (struct net_buf *)_bufs, \
.buf_count = _count, \
.uninit_count = _count, \
.destroy = _destroy, \
.alloc = _alloc, \
.__bufs = (struct net_buf *)_bufs, \
}
#endif /* CONFIG_BLE_MESH_NET_BUF_POOL_USAGE */