Skip to content

Commit

Permalink
Merge pull request #14148 from mikaleppanen/nano_coverity_corr_master
Browse files Browse the repository at this point in the history
Corrected nanostack coverity warnings
  • Loading branch information
0xc0170 authored Jan 20, 2021
2 parents fa2101c + 1e3d32a commit 4324d32
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class EMACPhy : public NanostackEthernetPhy {
EMAC &emac;
uint8_t mac_addr[6];
int8_t device_id = -1;
phy_device_driver_s phy;
phy_device_driver_s phy = {};
};

// GAH! no handles on the callback. Force a single interface
Expand Down Expand Up @@ -238,4 +238,4 @@ nsapi_error_t Nanostack::add_ethernet_interface(EMAC &emac, bool default_if, Onb
nsapi_error_t err = add_ethernet_interface(emac, default_if, &interface);
*interface_out = interface;
return err;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class PPPPhy : public NanostackPPPPhy {
bool active = false;
bool powered_up = false;
int8_t device_id = -1;
phy_device_driver_s phy;
phy_device_driver_s phy = {};
};

nsapi_error_t Nanostack::PPPInterface::initialize()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ uint32_t arm_random_seed_get(void)
uint32_t result = 0;
#ifdef MBEDTLS_ENTROPY_HARDWARE_ALT
#if defined(MBEDTLS_PLATFORM_C)
mbedtls_platform_setup(NULL);
int ret = mbedtls_platform_setup(NULL);
if (ret != 0) {
return result;
}
#endif /* MBEDTLS_PLATFORM_C */
/* Grab a seed from a function we provide for mbedtls */
size_t len;
Expand Down

0 comments on commit 4324d32

Please sign in to comment.