summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorFearlessTobi <thm.frey@gmail.com>2022-08-03 19:38:11 +0200
committerFearlessTobi <thm.frey@gmail.com>2022-08-15 20:25:42 +0200
commit5cd95fa949492c4da0bf2de93ac902f1838aa340 (patch)
tree52072a8e4677fb4ab48b443bbb366a44da816b52 /src/core
parentcore, yuzu: Address first part of review comments (diff)
downloadyuzu-5cd95fa949492c4da0bf2de93ac902f1838aa340.tar
yuzu-5cd95fa949492c4da0bf2de93ac902f1838aa340.tar.gz
yuzu-5cd95fa949492c4da0bf2de93ac902f1838aa340.tar.bz2
yuzu-5cd95fa949492c4da0bf2de93ac902f1838aa340.tar.lz
yuzu-5cd95fa949492c4da0bf2de93ac902f1838aa340.tar.xz
yuzu-5cd95fa949492c4da0bf2de93ac902f1838aa340.tar.zst
yuzu-5cd95fa949492c4da0bf2de93ac902f1838aa340.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/internal_network/network.cpp9
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() {
}
std::optional<IPv4Address> GetHostIPv4Address() {
- const auto interface = Network::GetSelectedNetworkInterface();
- if (!interface.has_value()) {
+ const auto network_interface = Network::GetSelectedNetworkInterface();
+ if (!network_interface.has_value()) {
LOG_ERROR(Network, "GetSelectedNetworkInterface returned no interface");
return {};
}
std::array<char, 16> ip_addr = {};
- ASSERT(inet_ntop(AF_INET, &interface->ip_address, ip_addr.data(), sizeof(ip_addr)) != nullptr);
- return TranslateIPv4(interface->ip_address);
+ ASSERT(inet_ntop(AF_INET, &network_interface->ip_address, ip_addr.data(), sizeof(ip_addr)) !=
+ nullptr);
+ return TranslateIPv4(network_interface->ip_address);
}
std::pair<s32, Errno> Poll(std::vector<PollFD>& pollfds, s32 timeout) {