Skip to content

Commit

Permalink
Merge pull request ARMmbed#1629 from ARMmbed/cppcheck_fixes
Browse files Browse the repository at this point in the history
Cppcheck fixes
  • Loading branch information
Jarkko Paso committed Mar 26, 2018
2 parents cab9849 + 85f1345 commit ff72d95
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
5 changes: 4 additions & 1 deletion source/MAC/IEEE802_15_4/mac_mcps_sap.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@ void mcps_sap_data_req_handler(protocol_interface_rf_mac_setup_s *rf_mac_setup ,

static bool mac_ie_vector_length_validate(ns_ie_iovec_t *ie_vector, uint16_t iov_length, uint16_t *length_out)
{
*length_out = 0;
if (length_out) {
*length_out = 0;
}

if (!iov_length) {
return true;
}
Expand Down
1 change: 0 additions & 1 deletion source/Service_Libs/fhss/fhss_configuration_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ int ns_fhss_delete(fhss_api_t *fhss_api)
return -1;
}
ns_dyn_mem_free(fhss_api);
fhss_api = NULL;
return 0;
}

Expand Down
6 changes: 2 additions & 4 deletions source/Service_Libs/fhss/fhss_ws.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,9 @@ fhss_structure_t *fhss_ws_enable(fhss_api_t *fhss_api, const fhss_ws_configurati

static int32_t fhss_ws_calc_bc_channel(fhss_structure_t *fhss_structure)
{
int32_t next_channel;

if (fhss_structure->ws->fhss_configuration.ws_channel_function == WS_FIXED_CHANNEL) {
int32_t next_channel = fhss_structure->rx_channel;

} else if (fhss_structure->ws->fhss_configuration.ws_channel_function == WS_TR51CF) {
if (fhss_structure->ws->fhss_configuration.ws_channel_function == WS_TR51CF) {
next_channel = tr51_get_bc_channel_index(fhss_structure->ws->bc_slot, fhss_structure->ws->fhss_configuration.bsi, fhss_structure->number_of_channels, NULL, 0);
if (++fhss_structure->ws->bc_slot == fhss_structure->number_of_channels) {
fhss_structure->ws->bc_slot = 0;
Expand Down

0 comments on commit ff72d95

Please sign in to comment.