diff --git a/esphome/components/socket/lwip_getaddrinfo_impl.cpp b/esphome/components/socket/lwip_getaddrinfo_impl.cpp index d4fb1fdc7d..d37087ad11 100644 --- a/esphome/components/socket/lwip_getaddrinfo_impl.cpp +++ b/esphome/components/socket/lwip_getaddrinfo_impl.cpp @@ -178,7 +178,7 @@ std::unique_ptr getaddrinfo_async(const char *node, const cha #ifdef USE_ESP8266 void freeaddrinfo(struct addrinfo *ai) { - while (ai != NULL) { + while (ai != nullptr) { struct addrinfo *next = ai->ai_next; delete ai; ai = next;