From bd3db823b158137b9b53317404f8756cb0ec3a7d Mon Sep 17 00:00:00 2001 From: Richard Retanubun Date: Thu, 19 May 2022 16:58:47 -0400 Subject: [PATCH] Fixup inversion error causing error prints ESP_RETURN_ON_FALSE(a, err_code, ...) macro Will print and return err_code if (unlikely(!(a))) so "a" needs to state what we expect to be TRUE which in this case means: mld6_leavegroup_netif(...) == ERR_OK --- components/esp_netif/lwip/esp_netif_lwip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_netif/lwip/esp_netif_lwip.c b/components/esp_netif/lwip/esp_netif_lwip.c index 390b9708f8..51b3137281 100644 --- a/components/esp_netif/lwip/esp_netif_lwip.c +++ b/components/esp_netif/lwip/esp_netif_lwip.c @@ -2000,7 +2000,7 @@ static esp_err_t esp_netif_leave_ip6_multicast_group_api(esp_netif_api_msg_t *ms #if LWIP_IPV6_SCOPES ip6addr.zone = 0; #endif - ESP_RETURN_ON_FALSE(mld6_leavegroup_netif(msg->esp_netif->lwip_netif, &ip6addr) != ERR_OK, + ESP_RETURN_ON_FALSE(mld6_leavegroup_netif(msg->esp_netif->lwip_netif, &ip6addr) == ERR_OK, ESP_ERR_ESP_NETIF_MLD6_FAILED, TAG, "Failed to leave ip6 multicast group"); return ESP_OK; }