Skip to content

Commit 24bd211

Browse files
PavelVPVnashif
authored andcommitted
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 <[email protected]>
1 parent 2b3175f commit 24bd211

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

subsys/bluetooth/mesh/access.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2105,10 +2105,11 @@ void bt_mesh_comp_data_clear(void)
21052105

21062106
int bt_mesh_models_metadata_change_prepare(void)
21072107
{
2108-
#if !IS_ENABLED(CONFIG_BT_MESH_LARGE_COMP_DATA_SRV)
2108+
#if IS_ENABLED(CONFIG_BT_MESH_LARGE_COMP_DATA_SRV)
2109+
return bt_mesh_models_metadata_store();
2110+
#else
21092111
return -ENOTSUP;
21102112
#endif
2111-
return bt_mesh_models_metadata_store();
21122113
}
21132114

21142115
static void commit_mod(struct bt_mesh_model *mod, struct bt_mesh_elem *elem,

0 commit comments

Comments
 (0)