This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Redundant variable assignment in provisioner in light_switch example

m_prov_state is getting assigned at line #150 as well, I thing the assignment here is redundant.

--- a/examples/light_switch/provisioner/src/provisioner_helper.c
+++ b/examples/light_switch/provisioner/src/provisioner_helper.c
@@ -112,7 +112,6 @@ static void start_provisioning(const uint8_t * p_uuid)
         };
     memcpy(prov_data.netkey, m_provisioner.p_nw_data->netkey, NRF_MESH_KEY_SIZE);
     ERROR_CHECK(nrf_mesh_prov_provision(&m_prov_ctx, p_uuid, &prov_data, NRF_MESH_PROV_BEARER_ADV));
-    m_prov_state = PROV_STATE_PROV;
 }

 static void prov_helper_provisioner_init(void)

I have also created a pull request on GitHub for this. Although this is minor and wont have any impact on functionality, I thought I should report it! 

Related