Resolve dead code in store_seg

If CONFIG_BT_MESH_SEQ_STORE_RATE is 1, the check in store_seq can be
reduced to a simple if (false), and the modulo code does not need to be
included in the build.

This is port of aef354c6bc3264de9f2a38b8c56ff5253b35912a
This commit is contained in:
Krzysztof Kopyściński
2021-11-10 06:24:00 +01:00
committed by Krzysztof Kopyściński
parent 9a7d9f4a7f
commit 135dd1b42e
+1 -1
View File
@@ -149,7 +149,7 @@ static void store_iv(bool only_duration)
static void store_seq(void)
{
if (CONFIG_BT_MESH_SEQ_STORE_RATE &&
if (CONFIG_BT_MESH_SEQ_STORE_RATE > 1 &&
(bt_mesh.seq % CONFIG_BT_MESH_SEQ_STORE_RATE)) {
return;
}