Skip to content

Commit f9501e7

Browse files
authored
Merge pull request #14147 from mikaleppanen/nano_coverity_corr_5_15
[mbed-os-5.15] Corrected nanostack coverity warnings
2 parents 04b572e + 9500f9f commit f9501e7

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

features/nanostack/mbed-mesh-api/source/NanostackEMACInterface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class EMACPhy : public NanostackEthernetPhy {
2727
EMAC &emac;
2828
uint8_t mac_addr[6];
2929
int8_t device_id;
30-
phy_device_driver_s phy;
30+
phy_device_driver_s phy = {};
3131
};
3232

3333
// GAH! no handles on the callback. Force a single interface

features/nanostack/mbed-mesh-api/source/NanostackPPPInterface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class PPPPhy : public NanostackPPPPhy {
5252
bool active;
5353
bool powered_up;
5454
int8_t device_id;
55-
phy_device_driver_s phy;
55+
phy_device_driver_s phy = {};
5656
};
5757

5858
nsapi_error_t Nanostack::PPPInterface::initialize()

features/nanostack/nanostack-hal-mbed-cmsis-rtos/arm_hal_random.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ uint32_t arm_random_seed_get(void)
3434
uint32_t result = 0;
3535
#ifdef MBEDTLS_ENTROPY_HARDWARE_ALT
3636
#if defined(MBEDTLS_PLATFORM_C)
37-
mbedtls_platform_setup(NULL);
37+
int ret = mbedtls_platform_setup(NULL);
38+
if (ret != 0) {
39+
return result;
40+
}
3841
#endif /* MBEDTLS_PLATFORM_C */
3942
/* Grab a seed from a function we provide for mbedtls */
4043
size_t len;

0 commit comments

Comments
 (0)