diff options
author | yazevnul <yazevnul@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:46 +0300 |
commit | 8cbc307de0221f84c80c42dcbe07d40727537e2c (patch) | |
tree | 625d5a673015d1df891e051033e9fcde5c7be4e5 /util/network/interface.cpp | |
parent | 30d1ef3941e0dc835be7609de5ebee66958f215a (diff) | |
download | ydb-8cbc307de0221f84c80c42dcbe07d40727537e2c.tar.gz |
Restoring authorship annotation for <yazevnul@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/network/interface.cpp')
-rw-r--r-- | util/network/interface.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/util/network/interface.cpp b/util/network/interface.cpp index 256776c6d3..1ad5f21191 100644 --- a/util/network/interface.cpp +++ b/util/network/interface.cpp @@ -11,7 +11,7 @@ namespace NAddr { static bool IsInetAddress(sockaddr* addr) { - return (addr != nullptr) && ((addr->sa_family == AF_INET) || (addr->sa_family == AF_INET6)); + return (addr != nullptr) && ((addr->sa_family == AF_INET) || (addr->sa_family == AF_INET6)); } TNetworkInterfaceList GetNetworkInterfaces() { @@ -23,7 +23,7 @@ namespace NAddr { PIP_ADAPTER_ADDRESSES adapterBuf = (PIP_ADAPTER_ADDRESSES)&buf[0]; ULONG bufSize = buf.ysize(); - if (GetAdaptersAddresses(AF_UNSPEC, 0, nullptr, adapterBuf, &bufSize) == ERROR_SUCCESS) { + if (GetAdaptersAddresses(AF_UNSPEC, 0, nullptr, adapterBuf, &bufSize) == ERROR_SUCCESS) { for (PIP_ADAPTER_ADDRESSES ptr = adapterBuf; ptr != 0; ptr = ptr->Next) { // The check below makes code working on Vista+ if ((ptr->Flags & (IP_ADAPTER_IPV4_ENABLED | IP_ADAPTER_IPV6_ENABLED)) == 0) { @@ -59,7 +59,7 @@ namespace NAddr { #else ifaddrs* ifap; if (getifaddrs(&ifap) != -1) { - for (ifaddrs* ifa = ifap; ifa != nullptr; ifa = ifa->ifa_next) { + for (ifaddrs* ifa = ifap; ifa != nullptr; ifa = ifa->ifa_next) { if (IsInetAddress(ifa->ifa_addr)) { TNetworkInterface interface; interface.Name = ifa->ifa_name; |