From f222aecc79a3eada282d010752d6a20d5666fcca Mon Sep 17 00:00:00 2001 From: Jeff Date: Wed, 20 Jul 2022 15:45:09 -0400 Subject: [PATCH] actually use correct variable in iteration --- llarp/net/net.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llarp/net/net.cpp b/llarp/net/net.cpp index ad066b24c..d8ef6698e 100644 --- a/llarp/net/net.cpp +++ b/llarp/net/net.cpp @@ -307,7 +307,7 @@ namespace llarp::net if (getifaddrs(&addrs)) throw std::runtime_error{fmt::format("getifaddrs(): {}", strerror(errno))}; - for (auto next = addrs; addrs and addrs->ifa_next; addrs = addrs->ifa_next) + for (auto next = addrs; next and next->ifa_next; next = next->ifa_next) visit(next); freeifaddrs(addrs);