diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-02-15 04:04:53 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-02-15 04:04:53 +0000 |
commit | 79d7f1f732d070abed9990caff2d775f1b0aca2b (patch) | |
tree | 8aaaeb612b6c3a1e3fb9647f0da35e8cf285a502 | |
parent | 40b2cf3f0b790a10b588e1f3a255462825dd630c (diff) | |
parent | a1f37d7e15e391e1973053f8d58f07e4d240f1b4 (diff) | |
download | openscreen-79d7f1f732d070abed9990caff2d775f1b0aca2b.tar.gz |
Snap for 8183730 from a1f37d7e15e391e1973053f8d58f07e4d240f1b4 to udc-releaseandroid-vts-14.0_r4android-vts-14.0_r3android-vts-14.0_r2android-vts-14.0_r1android-security-14.0.0_r8android-security-14.0.0_r7android-security-14.0.0_r6android-security-14.0.0_r5android-security-14.0.0_r4android-security-14.0.0_r3android-security-14.0.0_r2android-security-14.0.0_r1android-platform-14.0.0_r7android-platform-14.0.0_r6android-platform-14.0.0_r5android-platform-14.0.0_r4android-platform-14.0.0_r3android-platform-14.0.0_r2android-platform-14.0.0_r1android-cts-14.0_r4android-cts-14.0_r3android-cts-14.0_r2android-cts-14.0_r1android-14.0.0_r28android-14.0.0_r2android-14.0.0_r15android-14.0.0_r14android-14.0.0_r13android-14.0.0_r1android14-tests-releaseandroid14-security-releaseandroid14-s2-releaseandroid14-s1-releaseandroid14-releaseandroid14-platform-releaseandroid14-gsi
Change-Id: I13566d37a050980c9261fd2a52e5bbff2ebbc6f0
-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; |