mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-22 01:02:57 +00:00
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:
@@ -43,7 +43,7 @@ static void socket_init(void)
|
||||
int err;
|
||||
struct sockaddr_in saddr = { 0 };
|
||||
|
||||
esp_netif_init();
|
||||
ESP_ERROR_CHECK(esp_netif_init());
|
||||
|
||||
err = getaddrinfo("localhost", "80", &hints, &res);
|
||||
|
||||
|
Reference in New Issue
Block a user