Skip to content

Coverity fixes. #8965

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions features/nanostack/mbed-mesh-api/source/ethernet_tasklet.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,18 @@ static void enet_tasklet_poll_network_status(void *param)
*/
void enet_tasklet_configure_and_connect_to_network(void)
{
arm_nwk_interface_up(tasklet_data_ptr->network_interface_id);
enet_tasklet_network_state_changed(MESH_BOOTSTRAP_STARTED);
int8_t status;

status = arm_nwk_interface_up(tasklet_data_ptr->network_interface_id);
if (status >= 0) {
tasklet_data_ptr->tasklet_state = TASKLET_STATE_BOOTSTRAP_STARTED;
tr_info("Start Bootstrap");
enet_tasklet_network_state_changed(MESH_BOOTSTRAP_STARTED);
} else {
tasklet_data_ptr->tasklet_state = TASKLET_STATE_BOOTSTRAP_FAILED;
tr_err("Bootstrap start failed, %d", status);
enet_tasklet_network_state_changed(MESH_BOOTSTRAP_START_FAILED);
}
}

/*
Expand Down
2 changes: 1 addition & 1 deletion features/nanostack/mbed-mesh-api/source/wisun_tasklet.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ int8_t wisun_tasklet_connect(mesh_interface_cb callback, int8_t nwk_interface_id
re_connecting = false;
}

memset(wisun_tasklet_data_ptr, 0, sizeof(wisun_tasklet_data_ptr));
memset(wisun_tasklet_data_ptr, 0, sizeof(wisun_tasklet_data_str_t));
wisun_tasklet_data_ptr->mesh_api_cb = callback;
wisun_tasklet_data_ptr->network_interface_id = nwk_interface_id;
wisun_tasklet_data_ptr->tasklet_state = TASKLET_STATE_INITIALIZED;
Expand Down