esp8266-driver: fix variables init in constructor.

Fixes Coverity issue about not initialized members.
pull/11551/head
int_szyk 2019-09-23 10:19:22 +02:00
parent f513bce4a3
commit 24cb0334eb
1 changed files with 6 additions and 1 deletions

View File

@ -67,11 +67,13 @@ ESP8266Interface::ESP8266Interface()
_if_connected(_cmutex),
_initialized(false),
_connect_retval(NSAPI_ERROR_OK),
_disconnect_retval(NSAPI_ERROR_OK),
_conn_stat(NSAPI_STATUS_DISCONNECTED),
_conn_stat_cb(NULL),
_global_event_queue(mbed_event_queue()), // Needs to be set before attaching event() to SIGIO
_oob_event_id(0),
_connect_event_id(0),
_disconnect_event_id(0),
_software_conn_stat(IFACE_STATUS_DISCONNECTED)
{
memset(_cbs, 0, sizeof(_cbs));
@ -104,11 +106,14 @@ ESP8266Interface::ESP8266Interface(PinName tx, PinName rx, bool debug, PinName r
_if_connected(_cmutex),
_initialized(false),
_connect_retval(NSAPI_ERROR_OK),
_disconnect_retval(NSAPI_ERROR_OK),
_conn_stat(NSAPI_STATUS_DISCONNECTED),
_conn_stat_cb(NULL),
_global_event_queue(mbed_event_queue()), // Needs to be set before attaching event() to SIGIO
_oob_event_id(0),
_connect_event_id(0)
_connect_event_id(0),
_disconnect_event_id(0),
_software_conn_stat(IFACE_STATUS_DISCONNECTED)
{
memset(_cbs, 0, sizeof(_cbs));
memset(ap_ssid, 0, sizeof(ap_ssid));