Bluetooth: Mesh: Remove redundant initialization
This for loop runs inside an "if (!sub)" branch, so explicitly setting sub to NULL in the loop is redundant. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
f7e780a719
commit
ca10b6bc94
1 changed files with 1 additions and 1 deletions
|
@ -1965,7 +1965,7 @@ static void net_key_add(struct bt_mesh_model *model,
|
|||
if (!sub) {
|
||||
int i;
|
||||
|
||||
for (sub = NULL, i = 0; i < ARRAY_SIZE(bt_mesh.sub); i++) {
|
||||
for (i = 0; i < ARRAY_SIZE(bt_mesh.sub); i++) {
|
||||
if (bt_mesh.sub[i].net_idx == BT_MESH_KEY_UNUSED) {
|
||||
sub = &bt_mesh.sub[i];
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue