diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-02-12 04:04:23 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-02-12 04:04:23 +0000 |
commit | 485effd6600fb1e9de4f84c824d153e49cee9993 (patch) | |
tree | 8aaaeb612b6c3a1e3fb9647f0da35e8cf285a502 | |
parent | 30ac849f7cb6b97e9b7e0718a041f3642fc08fff (diff) | |
parent | a1f37d7e15e391e1973053f8d58f07e4d240f1b4 (diff) | |
download | openscreen-android13-d1-s2-release.tar.gz |
Snap for 8176975 from a1f37d7e15e391e1973053f8d58f07e4d240f1b4 to tm-d1-releaseandroid-13.0.0_r9android-13.0.0_r15android-13.0.0_r14android-13.0.0_r13android-13.0.0_r11android-13.0.0_r10android13-d1-s3-releaseandroid13-d1-s2-releaseandroid13-d1-s1-releaseandroid13-d1-release
Change-Id: I2dff57a2bff51dea8def033e2a4db238a9fd47ed
-rw-r--r-- | platform/impl/network_interface_win.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/platform/impl/network_interface_win.cc b/platform/impl/network_interface_win.cc index f90d35d2..c3095457 100644 --- a/platform/impl/network_interface_win.cc +++ b/platform/impl/network_interface_win.cc @@ -16,7 +16,6 @@ std::vector<InterfaceInfo> GetAllInterfaces() { constexpr size_t INITIAL_BUFFER_SIZE = 15000; ULONG outbuflen = INITIAL_BUFFER_SIZE; std::vector<unsigned char> charbuf(INITIAL_BUFFER_SIZE); - PIP_ADAPTER_ADDRESSES paddrs = reinterpret_cast<IP_ADAPTER_ADDRESSES*>(charbuf.data()); DWORD ret = NO_ERROR; constexpr int MAX_RETRIES = 5; @@ -25,7 +24,7 @@ std::vector<InterfaceInfo> GetAllInterfaces() { ret = GetAdaptersAddresses(AF_UNSPEC /* get both v4/v6 addrs */, GAA_FLAG_INCLUDE_PREFIX, NULL, - paddrs, + reinterpret_cast<IP_ADAPTER_ADDRESSES*>(charbuf.data()), &outbuflen); if (ret == ERROR_BUFFER_OVERFLOW) { charbuf.resize(outbuflen); @@ -40,7 +39,7 @@ std::vector<InterfaceInfo> GetAllInterfaces() { } std::vector<InterfaceInfo> infos; - auto pcurraddrs = paddrs; + auto pcurraddrs = reinterpret_cast<IP_ADAPTER_ADDRESSES*>(charbuf.data()); while (pcurraddrs != nullptr) { // TODO: return the interfaces OSP_DVLOG << "\tIfIndex=" << pcurraddrs->IfIndex; |