Bluetooth: Mesh: Avoid dead code in access
Use if-else-endif construction to avoid dead code. Coverity-CID: 316484, GitHub issue #58539 Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This commit is contained in:
parent
2b3175f2fa
commit
24bd211d77
1 changed files with 3 additions and 2 deletions
|
@ -2105,10 +2105,11 @@ void bt_mesh_comp_data_clear(void)
|
||||||
|
|
||||||
int bt_mesh_models_metadata_change_prepare(void)
|
int bt_mesh_models_metadata_change_prepare(void)
|
||||||
{
|
{
|
||||||
#if !IS_ENABLED(CONFIG_BT_MESH_LARGE_COMP_DATA_SRV)
|
#if IS_ENABLED(CONFIG_BT_MESH_LARGE_COMP_DATA_SRV)
|
||||||
|
return bt_mesh_models_metadata_store();
|
||||||
|
#else
|
||||||
return -ENOTSUP;
|
return -ENOTSUP;
|
||||||
#endif
|
#endif
|
||||||
return bt_mesh_models_metadata_store();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void commit_mod(struct bt_mesh_model *mod, struct bt_mesh_elem *elem,
|
static void commit_mod(struct bt_mesh_model *mod, struct bt_mesh_elem *elem,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue