esp_netif, examples: esp_netif_init() moved into ESP_ERROR_CHECK()

esp_netif_init() returns standard esp_err_t error code (unlike tcpip_adapter init), so shall be checked for the return value
Also to make the initialization code more consistent.
This commit is contained in:
David Cermak
2019-11-29 10:54:02 +01:00
parent b61b927008
commit 31b2702387
60 changed files with 60 additions and 60 deletions

View File

@@ -274,7 +274,7 @@ static void https_get_task(void *pvParameters)
void app_main(void)
{
ESP_ERROR_CHECK( nvs_flash_init() );
esp_netif_init();
ESP_ERROR_CHECK(esp_netif_init());
ESP_ERROR_CHECK(esp_event_loop_create_default());
/* This helper function configures Wi-Fi or Ethernet, as selected in menuconfig.