diff options
| -rw-r--r-- | src/core/internal_network/network.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/internal_network/network.cpp b/src/core/internal_network/network.cpp index 3b6906f7d..cdf38a2a4 100644 --- a/src/core/internal_network/network.cpp +++ b/src/core/internal_network/network.cpp | |||
| @@ -346,15 +346,16 @@ NetworkInstance::~NetworkInstance() { | |||
| 346 | } | 346 | } |
| 347 | 347 | ||
| 348 | std::optional<IPv4Address> GetHostIPv4Address() { | 348 | std::optional<IPv4Address> GetHostIPv4Address() { |
| 349 | const auto interface = Network::GetSelectedNetworkInterface(); | 349 | const auto network_interface = Network::GetSelectedNetworkInterface(); |
| 350 | if (!interface.has_value()) { | 350 | if (!network_interface.has_value()) { |
| 351 | LOG_ERROR(Network, "GetSelectedNetworkInterface returned no interface"); | 351 | LOG_ERROR(Network, "GetSelectedNetworkInterface returned no interface"); |
| 352 | return {}; | 352 | return {}; |
| 353 | } | 353 | } |
| 354 | 354 | ||
| 355 | std::array<char, 16> ip_addr = {}; | 355 | std::array<char, 16> ip_addr = {}; |
| 356 | ASSERT(inet_ntop(AF_INET, &interface->ip_address, ip_addr.data(), sizeof(ip_addr)) != nullptr); | 356 | ASSERT(inet_ntop(AF_INET, &network_interface->ip_address, ip_addr.data(), sizeof(ip_addr)) != |
| 357 | return TranslateIPv4(interface->ip_address); | 357 | nullptr); |
| 358 | return TranslateIPv4(network_interface->ip_address); | ||
| 358 | } | 359 | } |
| 359 | 360 | ||
| 360 | std::pair<s32, Errno> Poll(std::vector<PollFD>& pollfds, s32 timeout) { | 361 | std::pair<s32, Errno> Poll(std::vector<PollFD>& pollfds, s32 timeout) { |